mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 13:19:51 -05:00
CPack fix #11930 and simplifies component packaging options
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
#
|
||||
# Activate component packaging
|
||||
#
|
||||
if(CPACK_GENERATOR MATCHES "ZIP")
|
||||
set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON")
|
||||
endif(CPACK_GENERATOR MATCHES "ZIP")
|
||||
|
||||
if(CPACK_GENERATOR MATCHES "RPM")
|
||||
set(CPACK_RPM_COMPONENT_INSTALL "ON")
|
||||
endif(CPACK_GENERATOR MATCHES "RPM")
|
||||
|
||||
if(CPACK_GENERATOR MATCHES "DEB")
|
||||
set(CPACK_DEB_COMPONENT_INSTALL "ON")
|
||||
endif(CPACK_GENERATOR MATCHES "DEB")
|
||||
|
||||
#
|
||||
# Choose grouping way
|
||||
#
|
||||
set(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE 1)
|
||||
#set(CPACK_COMPONENTS_GROUPING)
|
||||
#set(CPACK_COMPONENTS_IGNORE_GROUPS 1)
|
||||
#set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
|
||||
@@ -37,38 +37,37 @@ if(CPackGen MATCHES "ZIP")
|
||||
set(expected_file_mask "${CPackComponentsForAll_BINARY_DIR}/MyLib-*.zip")
|
||||
if (${CPackComponentWay} STREQUAL "default")
|
||||
set(expected_count 1)
|
||||
endif(${CPackComponentWay} STREQUAL "default")
|
||||
if (${CPackComponentWay} STREQUAL "OnePackPerGroup")
|
||||
elseif (${CPackComponentWay} STREQUAL "OnePackPerGroup")
|
||||
set(expected_count 3)
|
||||
endif (${CPackComponentWay} STREQUAL "OnePackPerGroup")
|
||||
if (${CPackComponentWay} STREQUAL "IgnoreGroup")
|
||||
elseif (${CPackComponentWay} STREQUAL "IgnoreGroup")
|
||||
set(expected_count 4)
|
||||
endif (${CPackComponentWay} STREQUAL "IgnoreGroup")
|
||||
if (${CPackComponentWay} STREQUAL "AllInOne")
|
||||
elseif (${CPackComponentWay} STREQUAL "AllInOne")
|
||||
set(expected_count 1)
|
||||
endif (${CPackComponentWay} STREQUAL "AllInOne")
|
||||
if (${CPackComponentWay} STREQUAL "AllGroupsInOne")
|
||||
set(expected_count 1)
|
||||
endif (${CPackComponentWay} STREQUAL "AllGroupsInOne")
|
||||
endif ()
|
||||
elseif (CPackGen MATCHES "RPM")
|
||||
set(config_verbose -D "CPACK_RPM_PACKAGE_DEBUG=1")
|
||||
set(expected_file_mask "${CPackComponentsForAll_BINARY_DIR}/MyLib-*.rpm")
|
||||
if (${CPackComponentWay} STREQUAL "default")
|
||||
set(expected_count 1)
|
||||
endif (${CPackComponentWay} STREQUAL "default")
|
||||
if (${CPackComponentWay} STREQUAL "OnePackPerGroup")
|
||||
set(expected_count 2)
|
||||
endif (${CPackComponentWay} STREQUAL "OnePackPerGroup")
|
||||
if (${CPackComponentWay} STREQUAL "IgnoreGroup")
|
||||
elseif (${CPackComponentWay} STREQUAL "OnePackPerGroup")
|
||||
set(expected_count 3)
|
||||
elseif (${CPackComponentWay} STREQUAL "IgnoreGroup")
|
||||
set(expected_count 4)
|
||||
endif (${CPackComponentWay} STREQUAL "IgnoreGroup")
|
||||
if (${CPackComponentWay} STREQUAL "AllInOne")
|
||||
elseif (${CPackComponentWay} STREQUAL "AllInOne")
|
||||
set(expected_count 1)
|
||||
endif (${CPackComponentWay} STREQUAL "AllInOne")
|
||||
if (${CPackComponentWay} STREQUAL "AllGroupsInOne")
|
||||
endif ()
|
||||
elseif (CPackGen MATCHES "DEB")
|
||||
set(expected_file_mask "${CPackComponentsForAll_BINARY_DIR}/MyLib-*.deb")
|
||||
if (${CPackComponentWay} STREQUAL "default")
|
||||
set(expected_count 1)
|
||||
endif (${CPackComponentWay} STREQUAL "AllGroupsInOne")
|
||||
endif(CPackGen MATCHES "ZIP")
|
||||
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()
|
||||
|
||||
# clean-up previously CPack generated files
|
||||
if(expected_file_mask)
|
||||
|
||||
Reference in New Issue
Block a user