CMake/Tests/RunCMake/IfacePaths/RelativePathInGenex.cmake
Stephen Kelly 6da65b3907 Allow export of targets with INTERFACE_SOURCES.
Use the same rules for paths in source and binary dirs in
installed INTERFACE_SOURCES as are used for
INTERFACE_INCLUDE_DIRECTORIES.
2015-02-11 00:51:34 +01:00

14 lines
419 B
CMake

enable_language(CXX)
add_library(testTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
if (TEST_PROP STREQUAL INCLUDE_DIRECTORIES)
set_property(TARGET testTarget PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<1:foo>")
else()
set_property(TARGET testTarget PROPERTY INTERFACE_SOURCES "$<1:empty.cpp>")
endif()
add_library(userTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
target_link_libraries(userTarget testTarget)