I have a project that looks like:

project_root/lib/util

In util is the CMakeLists.txt file that contains all the necessary commands to build the util lib.

In the lib dir is a CMakeLists.txt file that simply has add_subdirectory(util).

In the project_root dir is a CMakeLists.txt file that simply has add_subdirectory(lib).

If I enter the util directory and issue:

cmake .
make

then the library builds fine.

If I enter lib and do the same, the library builds fine.

but if I enter the project root and do the same, I get errors about a header not being found. I'm confused as to how that can be the case if the two dependent directories built fine?

Any thoughts as to why this might be happening?

Thanks,

Wade
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to