[CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

Bill Hoffman bill.hoffman at kitware.com
Tue Nov 25 16:54:34 EST 2008


Sean Soria wrote:
> CMakeLists.txt:
> ADD_EXECUTABLE(hello main.c foo/main.c)
> ADD_SUBDIRECTORY(foo)
> 
> foo/CMakeLists.txt:
> INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
> 

It is order dependent.

So, the include_directory will not affect the hello target because it 
comes after it.


-Bill


More information about the CMake mailing list