mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Add component support to DragNDrop generator.
This commit is contained in:
committed by
Brad King
parent
64a5e20999
commit
2973c1fbeb
@@ -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)
|
||||
|
||||
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user