I have this in my cmake-file
get_target_property(moggle_interface_includes moggle INTERFACE_INCLUDE_DIRECTORIES) message("Moggle interface includes: ${moggle_interface_includes}") target_link_libraries(motor moggle ) get_target_property(motor_includes motor INCLUDE_DIRECTORIES) message("MOTOR includes ${motor_includes}") Which outputs this
Moggle interface includes: "/home/nick/code/onegame/motor/moggle/include" Motor includes:" " How can this be? When moggle is linked, it should also, according to this
CMake will also propagate "usage requirements" from linked library targets. Usage requirements affect compilation of sources in the <target>. They are specified by properties defined on linked targets. During generation of the build system, CMake integrates usage requirement property values with the corresponding build properties for <target>: INTERFACE_COMPILE_DEFINITONS: Appends to COMPILE_DEFINITONS INTERFACE_INCLUDE_DIRECTORIES: Appends to INCLUDE_DIRECTORIES ... pick up the INTERFACE_INCLUDE_DIRECTORIES and add them to motor's, so what am I doing wrong?
- CMake verison: cmake version 2.8.12.2
- OS: Arch Linux
GLOBALtoadd_library.