diff options
author | Brad King <brad.king@kitware.com> | 2013-07-26 13:01:06 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-07-26 13:01:06 (GMT) |
commit | c82b1cbe83d8738815fb741432f03533c033a236 (patch) | |
tree | 5e1565e75dd77b5a80e13e58bf6038a04240c27d /Tests | |
parent | 003154f62c2048538633215fa561e95cc094a6e3 (diff) | |
parent | 650e61f833c2cc3ace8405a22eb80a10cfc6187c (diff) | |
download | CMake-c82b1cbe83d8738815fb741432f03533c033a236.zip CMake-c82b1cbe83d8738815fb741432f03533c033a236.tar.gz CMake-c82b1cbe83d8738815fb741432f03533c033a236.tar.bz2 |
Merge topic 'install-interface-includes'
650e61f Add a convenient way to add the includes install dir to the INTERFACE.
Diffstat (limited to 'Tests')
6 files changed, 31 insertions, 1 deletions
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index 3262523..787856f 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -271,9 +271,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) diff --git a/Tests/ExportImport/Import/A/deps_iface.c b/Tests/ExportImport/Import/A/deps_iface.c index e73ca26..d9dc331 100644 --- a/Tests/ExportImport/Import/A/deps_iface.c +++ b/Tests/ExportImport/Import/A/deps_iface.c @@ -3,6 +3,9 @@ #include "testLibIncludeRequired2.h" #include "testLibIncludeRequired6.h" +#include "installIncludesTest.h" +#include "installIncludesTest2.h" + #ifndef testLibRequired_IFACE_DEFINE #error Expected testLibRequired_IFACE_DEFINE #endif diff --git a/Tests/RunCMake/include_directories/RunCMakeTest.cmake b/Tests/RunCMake/include_directories/RunCMakeTest.cmake index 520dd44..e582960 100644 --- a/Tests/RunCMake/include_directories/RunCMakeTest.cmake +++ b/Tests/RunCMake/include_directories/RunCMakeTest.cmake @@ -9,3 +9,4 @@ run_cmake(RelativePathInInterface) run_cmake(ImportedTarget) run_cmake(RelativePathInGenex) run_cmake(CMP0021) +run_cmake(TargetInterfaceIncludes) diff --git a/Tests/RunCMake/include_directories/TargetInterfaceIncludes-result.txt b/Tests/RunCMake/include_directories/TargetInterfaceIncludes-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/include_directories/TargetInterfaceIncludes-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/include_directories/TargetInterfaceIncludes-stderr.txt b/Tests/RunCMake/include_directories/TargetInterfaceIncludes-stderr.txt new file mode 100644 index 0000000..d153927 --- /dev/null +++ b/Tests/RunCMake/include_directories/TargetInterfaceIncludes-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at TargetInterfaceIncludes.cmake:3 \(install\): + install TARGETS given INCLUDES DESTINATION, but EXPORT set not specified. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/include_directories/TargetInterfaceIncludes.cmake b/Tests/RunCMake/include_directories/TargetInterfaceIncludes.cmake new file mode 100644 index 0000000..92f31fc --- /dev/null +++ b/Tests/RunCMake/include_directories/TargetInterfaceIncludes.cmake @@ -0,0 +1,4 @@ + +add_library(empty empty.cpp) +install(TARGETS empty DESTINATION lib INCLUDES DESTINATION include) +# install(EXPORT ) |