summaryrefslogtreecommitdiff
path: root/Tests/SimpleInstallS2
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-03-24 16:11:24 -0500
committerBrad King <brad.king@kitware.com>2006-03-24 16:11:24 -0500
commitca5647c92c7500f64d54f65bf6deeb20cec9cbf6 (patch)
tree73d7f1b6ef1a67badbb070db6621a21944ff51c3 /Tests/SimpleInstallS2
parenta18297e2ca80490e42dadcfabea01a8798d662a0 (diff)
downloadcmake-ca5647c92c7500f64d54f65bf6deeb20cec9cbf6.tar.gz
ENH: Added ARCHIVE option to the TARGETS mode of the INSTALL command. It is a third option added to RUNTIME and LIBRARY property types. Static libraries and import libraries are now treated as ARCHIVE targets instead of LIBRARY targets. This adds a level of granularity necessary for upcoming features. Also updated the CVS CMake patch level set in CMake_VERSION_PATCH from 4 to 5 to allow users of this version to know whether this incompatible change is present.
Diffstat (limited to 'Tests/SimpleInstallS2')
-rw-r--r--Tests/SimpleInstallS2/CMakeLists.txt21
1 files changed, 18 insertions, 3 deletions
diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt
index bc42e4026c..31585ea39d 100644
--- a/Tests/SimpleInstallS2/CMakeLists.txt
+++ b/Tests/SimpleInstallS2/CMakeLists.txt
@@ -22,7 +22,10 @@ SET(EXTRA_INSTALL_FLAGS)
MESSAGE("Extra install: ${EXTRA_INSTALL_FLAGS}")
IF(STAGE2)
- SET(LIBPATHS "${CMAKE_INSTALL_PREFIX}/MyTest/lib")
+ SET(LIBPATHS
+ ${CMAKE_INSTALL_PREFIX}/MyTest/lib/static
+ ${CMAKE_INSTALL_PREFIX}/MyTest/lib
+ )
SET(t1NAMES test1 test1${CMAKE_DEBUG_POSTFIX})
SET(t2NAMES test2 test2${CMAKE_DEBUG_POSTFIX})
SET(t4NAMES test4 test4${CMAKE_DEBUG_POSTFIX})
@@ -63,6 +66,12 @@ IF(STAGE2)
TARGET_LINK_LIBRARIES(SimpleInstallS2 ${TEST1_LIBRARY} ${TEST2_LIBRARY} ${TEST4_LIBRARY})
SET(install_target SimpleInstallS2)
+ IF("${TEST1_LIBRARY}" MATCHES "static")
+ MESSAGE(STATUS "test1 correctly found in lib/static")
+ ELSE("${TEST1_LIBRARY}" MATCHES "static")
+ MESSAGE(SEND_ERROR "test1 not found in lib/static!")
+ ENDIF("${TEST1_LIBRARY}" MATCHES "static")
+
# Make sure the test executable can run from the install tree.
SET_TARGET_PROPERTIES(SimpleInstallS2 PROPERTIES
INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/MyTest/lib)
@@ -93,9 +102,15 @@ ELSE(STAGE2)
ADD_DEPENDENCIES(test4 test2)
INSTALL(TARGETS SimpleInstall test1 test2 test3
- RUNTIME DESTINATION MyTest/bin LIBRARY DESTINATION MyTest/lib)
+ RUNTIME DESTINATION MyTest/bin # .exe, .dll
+ LIBRARY DESTINATION MyTest/lib # .so, module.dll, ...
+ ARCHIVE DESTINATION MyTest/lib/static # .a, .lib
+ )
INSTALL(TARGETS test4 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
- RUNTIME DESTINATION MyTest/bin LIBRARY DESTINATION MyTest/lib)
+ RUNTIME DESTINATION MyTest/bin
+ LIBRARY DESTINATION MyTest/lib
+ ARCHIVE DESTINATION MyTest/lib/static
+ )
INSTALL(FILES lib1.h DESTINATION MyTest/include/foo)
INSTALL(FILES lib2.h
DESTINATION MyTest/include/foo