summaryrefslogtreecommitdiffstats
path: root/Tests/ExportImport/Export
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-01-05 11:13:49 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-07-24 15:32:58 (GMT)
commit650e61f833c2cc3ace8405a22eb80a10cfc6187c (patch)
tree5cf31f8d89fab889dc622bf5f0f751dd0cb4db3e /Tests/ExportImport/Export
parentff6de6d325fec9b4f257b27388be4a24fd8cadfe (diff)
downloadCMake-650e61f833c2cc3ace8405a22eb80a10cfc6187c.zip
CMake-650e61f833c2cc3ace8405a22eb80a10cfc6187c.tar.gz
CMake-650e61f833c2cc3ace8405a22eb80a10cfc6187c.tar.bz2
Add a convenient way to add the includes install dir to the INTERFACE.
Export the INCLUDES DESTINATION without appending to the INTERFACE_INCLUDE_DIRECTORIES of the target itself. That way, a target can be exported multiple times with different INCLUDES DESTINATION without unintended cross-pollution of export sets.
Diffstat (limited to 'Tests/ExportImport/Export')
-rw-r--r--Tests/ExportImport/Export/CMakeLists.txt19
1 files changed, 18 insertions, 1 deletions
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index 370dffe..737ec43 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -270,9 +270,26 @@ install(TARGETS testLibRequired
testLibIncludeRequired5
testLibIncludeRequired6
testSharedLibRequired
- EXPORT RequiredExp DESTINATION lib )
+ EXPORT RequiredExp DESTINATION lib
+ INCLUDES DESTINATION
+ installIncludesTest
+ $<INSTALL_PREFIX>/installIncludesTest2)
install(EXPORT RequiredExp NAMESPACE Req:: FILE testLibRequiredTargets.cmake DESTINATION lib/cmake/testLibRequired)
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest/installIncludesTest.h" "// No content\n")
+
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest2")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest2/installIncludesTest2.h" "// No content\n")
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest/installIncludesTest.h"
+ DESTINATION installIncludesTest
+)
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest2/installIncludesTest2.h"
+ DESTINATION installIncludesTest2
+)
+
install(TARGETS testLibDepends testSharedLibDepends EXPORT DependsExp DESTINATION lib )
install(EXPORT DependsExp FILE testLibDependsTargets.cmake DESTINATION lib/cmake/testLibDepends)