hi I am building a shared library project that's composed of many smaller shared library files.
Here's the main shared library project and a list of all the sub projects. SET(HEADER_FILES ${CMAKE_CURRENT_SOURCE_DIR}/headers/main_lib.h) SET(SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/main_lib.c) SET(TARGET_LIBS core_math point2d line2d quad2d timer_utils) ADD_LIBRARY(main_lib SHARED ${SRC_FILES} ${HEADER_FILES}) TARGET_LINK_LIBRARIES(core_engine ${TARGET_LIBS}) i have each module setup like this. module module/headers/module.h module/module.c then the module.c will look like this #include "headers/module.h" the file main_lib.h depends on all those target libs, which makes my main_lib.h file's include statement look like this #include "../../module/headers/module.h" #include "../../module1/headers/module1.h" #include "../../module2/headers/module2.h" is there any way that I can clean up these includes? For example if I want to use io functions I can just do #include <stdio.h> or #include <math.h> for math functions. I would like to make my include statements not relative to the files actual location, the way it's currently hard coded.
-- 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