CMakeLists.txt:
INCLUDE_DIRECTORIES(.)
ADD_SUBDIRECTORY(foo)
ADD_EXECUTABLE(hello main.c foo/main.c)

foo/CMakeLists.txt:
INCLUDE_DIRECTORIES(.)

I would expect foo/main.c to be compiled with:
/usr/bin/gcc   -I/code/xbmc/XBMC/build.test/.
-I/code/xbmc/XBMC/build.test/foo/.   -o
CMakeFiles/hello.dir/foo/main.o   -c
/code/xbmc/XBMC/build.test/foo/main.c

I even see the include path defined in
foo/CMakeFiles/CMakeDirectoryInformation.cmake:
SET(CMAKE_C_INCLUDE_PATH
  "."
  "foo/."
  )

Unfortunately cmake seems to ignore these and I get this instead:
/usr/bin/gcc   -I/code/xbmc/XBMC/build.test/.   -o
CMakeFiles/hello.dir/foo/main.o   -c
/code/xbmc/XBMC/build.test/foo/main.c

Am I missing something or is INCLUDE_DIRECTORIES broken?  I've even
tried set_property on the directory.
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to