I have a project with many libs and one executable. I read this email exchange: https://cmake.org/pipermail/cmake/2009-December/033979.html
on adding linker flags but this was from around 2009 and things most likely have changed a lot since then. in my executable my cmakelists.txt looks like this SET(CMAKE_MACOSX_RPATH 1) FIND_PACKAGE(SDL2 REQUIRED) FIND_PACKAGE(OpenGL REQUIRED) INCLUDE_DIRECTORIES( ${OPENGL_INCLUDE_DIR} ${SDL2_INCLUDE_DIR}) SET(HEADER_FILES ${CMAKE_CURRENT_SOURCE_DIR}/headers/core_engine.h) SET(SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/core_engine.c) SET(TARGET_LIBS ${OPENGL_LIBRARIES} ${SDL2_LIBRARY} core_math default_shader_2D renderable_2D cam_2d resource_utils timer_utils) SET(CMAKE_C_FLAGS "-Wall -pg ${CMAKE_C_FLAGS}") SET(CMAKE_EXE_LINKER_FLAGS "-Wall -pg ${CMAKE_EXE_LINKER_FLAGS}") ADD_LIBRARY(core_engine SHARED ${SRC_FILES} ${HEADER_FILES}) TARGET_LINK_LIBRARIES(core_engine ${TARGET_LIBS}) i've set the cmake_c_flags as well as the cmake_exe_linker_flags but I still can't get the output from my executable after running cmake. How can I add the proper flags?
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake