2008/11/25 Sean Soria <[EMAIL PROTECTED]>:
> CMakeLists.txt:
> INCLUDE_DIRECTORIES(.)
> ADD_SUBDIRECTORY(foo)
> ADD_EXECUTABLE(hello main.c foo/main.c)
>
How about an absolute path instead of a relative?
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} )
> 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
>
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake