summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2011-03-28 15:11:27 (GMT)
committerBrad King <brad.king@kitware.com>2011-03-31 17:33:10 (GMT)
commit2973c1fbebcbaff944ff2d75e5a44437bf9725c7 (patch)
tree5da5072ce3961e4ae4c0f824bdb929cac0b9d6fd /Tests
parent64a5e209998f12662a56346f855b1973cbbd0440 (diff)
downloadCMake-2973c1fbebcbaff944ff2d75e5a44437bf9725c7.zip
CMake-2973c1fbebcbaff944ff2d75e5a44437bf9725c7.tar.gz
CMake-2973c1fbebcbaff944ff2d75e5a44437bf9725c7.tar.bz2
Add component support to DragNDrop generator.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLists.txt3
-rw-r--r--Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in6
-rw-r--r--Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake13
3 files changed, 21 insertions, 1 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 6265f81..08d15d5 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -566,6 +566,9 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
set(CPackRun_CPackCommand "-DCPackCommand=${CMAKE_CPACK_COMMAND}")
# set up list of CPack generators
list(APPEND GENLST "ZIP")
+ if(APPLE)
+ list(APPEND GENLST "DragNDrop")
+ endif(APPLE)
if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CURRENT_BINARY_DIR MATCHES ".* .*")
find_program(RPMBUILD NAMES rpmbuild)
endif(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CURRENT_BINARY_DIR MATCHES ".* .*")
diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in
index 7b665b6..1e1a410 100644
--- a/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in
+++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in
@@ -13,10 +13,14 @@ if(CPACK_GENERATOR MATCHES "DEB")
set(CPACK_DEB_COMPONENT_INSTALL "ON")
endif(CPACK_GENERATOR MATCHES "DEB")
+if(CPACK_GENERATOR MATCHES "DragNDrop")
+ set(CPACK_COMPONENTS_GROUPING "ONE_PER_GROUP")
+endif(CPACK_GENERATOR MATCHES "DragNDrop")
+
#
# Choose grouping way
#
#set(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE)
#set(CPACK_COMPONENTS_GROUPING)
#set(CPACK_COMPONENTS_IGNORE_GROUPS)
-#set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE) \ No newline at end of file
+#set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE)
diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
index 77a1979..e2d343d 100644
--- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
+++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
@@ -69,6 +69,19 @@ elseif (CPackGen MATCHES "DEB")
endif ()
endif()
+if(CPackGen MATCHES "DragNDrop")
+ set(expected_file_mask "${CPackComponentsForAll_BINARY_DIR}/MyLib-*.dmg")
+ if (${CPackComponentWay} STREQUAL "default")
+ set(expected_count 1)
+ elseif (${CPackComponentWay} STREQUAL "OnePackPerGroup")
+ set(expected_count 3)
+ elseif (${CPackComponentWay} STREQUAL "IgnoreGroup")
+ set(expected_count 4)
+ elseif (${CPackComponentWay} STREQUAL "AllInOne")
+ set(expected_count 1)
+ endif ()
+endif(CPackGen MATCHES "DragNDrop")
+
# clean-up previously CPack generated files
if(expected_file_mask)
file(GLOB expected_file "${expected_file_mask}")