summaryrefslogtreecommitdiffstats
path: root/Tests/ExportImport
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-02-01 14:57:47 (GMT)
committerBrad King <brad.king@kitware.com>2008-02-01 14:57:47 (GMT)
commit587419db831b9e7e2172bcb6e5b04d81198c5eb8 (patch)
tree82b126cfc26d824136375e474668679b57cd558a /Tests/ExportImport
parentf49ec94e9f4e90a1c65048c1a587469ece5ee05a (diff)
downloadCMake-587419db831b9e7e2172bcb6e5b04d81198c5eb8.zip
CMake-587419db831b9e7e2172bcb6e5b04d81198c5eb8.tar.gz
CMake-587419db831b9e7e2172bcb6e5b04d81198c5eb8.tar.bz2
ENH: Update ExportImport test to enforce dependent library paths
- Build without rpaths - Place implementation libs in separate directories
Diffstat (limited to 'Tests/ExportImport')
-rw-r--r--Tests/ExportImport/CMakeLists.txt2
-rw-r--r--Tests/ExportImport/Export/CMakeLists.txt9
2 files changed, 11 insertions, 0 deletions
diff --git a/Tests/ExportImport/CMakeLists.txt b/Tests/ExportImport/CMakeLists.txt
index 3088228..5577113 100644
--- a/Tests/ExportImport/CMakeLists.txt
+++ b/Tests/ExportImport/CMakeLists.txt
@@ -41,6 +41,7 @@ add_custom_command(
-DCMAKE_C_FLAGS_MINSIZEREL:STRING=${CMAKE_C_FLAGS_MINSIZEREL}
-DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_C_FLAGS_RELWITHDEBINFO}
-DCMAKE_INSTALL_PREFIX:STRING=${ExportImport_BINARY_DIR}/Root
+ -DCMAKE_SKIP_RPATH:BOOL=ON
)
add_custom_target(ExportTarget ALL DEPENDS ${ExportImport_BINARY_DIR}/ExportProject)
add_dependencies(ExportTarget CleanupTarget)
@@ -68,6 +69,7 @@ add_custom_command(
-DCMAKE_C_FLAGS_MINSIZEREL:STRING=${CMAKE_C_FLAGS_MINSIZEREL}
-DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_C_FLAGS_RELWITHDEBINFO}
-DCMAKE_INSTALL_PREFIX:STRING=${ExportImport_BINARY_DIR}/Root
+ -DCMAKE_SKIP_RPATH:BOOL=ON
)
add_custom_target(ImportTarget ALL DEPENDS ${ExportImport_BINARY_DIR}/ImportProject)
add_dependencies(ImportTarget ExportTarget)
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index a9c6e51..1e6307a 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -10,6 +10,7 @@ add_executable(testExe1 testExe1.c)
target_link_libraries(testExe1 testExe1lib)
add_library(testExe2libImp SHARED testExe2libImp.c)
+set_property(TARGET testExe2libImp PROPERTY LIBRARY_OUTPUT_DIRECTORY impl)
add_library(testExe2lib SHARED testExe2lib.c)
target_link_libraries(testExe2lib testExe2libImp)
set_property(TARGET testExe2lib PROPERTY LINK_INTERFACE_LIBRARIES "")
@@ -22,6 +23,7 @@ add_library(testLib2 STATIC testLib2.c)
target_link_libraries(testLib2 testLib1)
add_library(testLib3Imp SHARED testLib3Imp.c)
+set_property(TARGET testLib3Imp PROPERTY LIBRARY_OUTPUT_DIRECTORY impl)
add_library(testLib3 SHARED testLib3.c)
target_link_libraries(testLib3 testLib3Imp)
set_property(TARGET testLib3 PROPERTY LINK_INTERFACE_LIBRARIES "")
@@ -36,6 +38,13 @@ set_property(TARGET testExe3 PROPERTY MACOSX_BUNDLE 1)
install(
TARGETS
testExe2libImp testLib3Imp
+ EXPORT exp
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib/impl
+ ARCHIVE DESTINATION lib/impl
+ )
+install(
+ TARGETS
testExe1 testLib1 testLib2 testExe2 testLib3 testLib4 testExe3
testExe2lib
EXPORT exp