Running CMake 3.0-rc3 and the docs for target_include_directories say the paths may be absolute or relative. Indeed the following works as desired:
target_include_directories( MyTarget PRIVATE some/dir ) The docs also mention that generator expressions can be used. However the following produces an error: target_include_directories( MyTarget PRIVATE $<$<PLATFORM_ID:Linux>:some/dir> ) CMake Error in CMakeLists.txt: Found relative path while evaluating include directories of "foo": "some/dir" It seems absolute paths are necessary. eg: target_include_directories( MyTarget PRIVATE $<$<PLATFORM_ID:Linux>:${CMAKE_CURRENT_SOURCE_DIR}/some/dir> ) will perform as expected. Is this behaviour expected (and should be documented) or should I file a bug? Thanks, -Andrew
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake