summaryrefslogtreecommitdiff
path: root/Tests/ExportImport/Export/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/ExportImport/Export/CMakeLists.txt')
-rw-r--r--Tests/ExportImport/Export/CMakeLists.txt16
1 files changed, 14 insertions, 2 deletions
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index f06a465..e19ab88 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -56,7 +56,7 @@ add_library(testLib6 STATIC testLib6.cxx testLib6c.c)
set(VS6)
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6")
set(VS6 1)
-endif("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6")
+endif()
# Test using the target_link_libraries command to set the
# LINK_INTERFACE_LIBRARIES* properties. We construct two libraries
@@ -87,6 +87,18 @@ target_link_libraries(testLibCycleA testLibCycleB)
target_link_libraries(testLibCycleB testLibCycleA)
set_property(TARGET testLibCycleA PROPERTY LINK_INTERFACE_MULTIPLICITY 3)
+# Test exporting dependent libraries into different exports
+add_library(testLibRequired testLibRequired.c)
+add_library(testLibDepends testLibDepends.c)
+target_link_libraries(testLibDepends testLibRequired)
+
+install(TARGETS testLibRequired EXPORT RequiredExp DESTINATION lib )
+install(EXPORT RequiredExp NAMESPACE Req:: FILE testLibRequiredConfig.cmake DESTINATION lib/cmake/testLibRequired)
+
+install(TARGETS testLibDepends EXPORT DependsExp DESTINATION lib )
+install(EXPORT DependsExp FILE testLibDependsConfig.cmake DESTINATION lib/cmake/testLibDepends)
+
+
# Install and export from install tree.
install(
TARGETS
@@ -129,7 +141,7 @@ install(EXPORT exp NAMESPACE exp_ DESTINATION lib/exp)
# Install testLib5.dll outside the export.
if(WIN32)
install(TARGETS testLib5 RUNTIME DESTINATION bin)
-endif(WIN32)
+endif()
# Export from build tree.
export(TARGETS testExe1 testLib1 testLib2 testLib3