[CMake] [Q] howto merge include dirs from dependencies?
Paweł Sikora
pluto at agmk.net
Wed Sep 1 06:36:50 EDT 2010
hi,
i'm thinking about migration my custom makefiles for very large
project to cmake system and generally have a one problem.
e.g. i have a library (mylib) and a binary (coreApp) placed
in subdirectiories with one top-level cmakelists.txt:
top-level dir:
CMakeLists.txt { cmake_minimum_required (VERSION 2.6) add_subdirectory
(core) add_subdirectory (mylib) }
core
mylib
./core subdir:
CMakeLists.txt { add_executable (coreApp main.cpp) target_link_libraries
(coreApp mylib) }
main.cpp
./mylib subdir:
CMakeLists.txt { include_directories (h) add_library (mylib SHARED
mylib.cpp) }
h
mylib.cpp
./mylib/h:
mylib.hpp
for mylib build i'm adding the "h" subdir with interface headers
but i need the mylib/h include path also for coreApp build.
is there a simply way to pull include dirs from dependencies?
More information about the CMake
mailing list