Add component support to DragNDrop generator.

This commit is contained in:
Clinton Stimpson
2011-03-28 09:11:27 -06:00
committed by Brad King
parent 64a5e20999
commit 2973c1fbeb
7 changed files with 124 additions and 7 deletions

View File

@@ -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)
#set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE)

View File

@@ -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}")