summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/IfacePaths/SourceDirectoryInInterface.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-11-28 17:58:38 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-02-10 23:51:34 (GMT)
commit6da65b3907419df28484c570f24d0da3593a0e5a (patch)
treeae814193dd7306ad6aa369dca4d489f9f8f6eaf9 /Tests/RunCMake/IfacePaths/SourceDirectoryInInterface.cmake
parent736bcb9664b714b91e8a2a573451e0453716f4da (diff)
downloadCMake-6da65b3907419df28484c570f24d0da3593a0e5a.zip
CMake-6da65b3907419df28484c570f24d0da3593a0e5a.tar.gz
CMake-6da65b3907419df28484c570f24d0da3593a0e5a.tar.bz2
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.
Diffstat (limited to 'Tests/RunCMake/IfacePaths/SourceDirectoryInInterface.cmake')
-rw-r--r--Tests/RunCMake/IfacePaths/SourceDirectoryInInterface.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/Tests/RunCMake/IfacePaths/SourceDirectoryInInterface.cmake b/Tests/RunCMake/IfacePaths/SourceDirectoryInInterface.cmake
index f814a3c..d80cbec 100644
--- a/Tests/RunCMake/IfacePaths/SourceDirectoryInInterface.cmake
+++ b/Tests/RunCMake/IfacePaths/SourceDirectoryInInterface.cmake
@@ -2,7 +2,11 @@
enable_language(CXX)
add_library(testTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
-target_include_directories(testTarget INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/foo")
+if (TEST_PROP STREQUAL INCLUDE_DIRECTORIES)
+ set_property(TARGET testTarget PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/foo")
+else()
+ set_property(TARGET testTarget PROPERTY INTERFACE_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
+endif()
install(TARGETS testTarget EXPORT testTargets
DESTINATION lib