2011-02-19 15:09:36 +02:00
|
|
|
#
|
|
|
|
# Activate component packaging
|
|
|
|
#
|
|
|
|
if(CPACK_GENERATOR MATCHES "ZIP")
|
|
|
|
set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON")
|
2013-03-16 19:13:01 +02:00
|
|
|
endif()
|
2011-02-19 15:09:36 +02:00
|
|
|
|
|
|
|
if(CPACK_GENERATOR MATCHES "RPM")
|
2015-04-27 22:25:09 +02:00
|
|
|
set(CPACK_RPM_COMPONENT_INSTALL "ON")
|
|
|
|
|
|
|
|
# test that /usr and /usr/foo get omitted in relocatable
|
|
|
|
# rpms as shortest relocation path is treated as base of
|
|
|
|
# package (/usr/foo/bar is relocatable and must exist)
|
|
|
|
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/foo/bar")
|
|
|
|
|
|
|
|
# test requires
|
2016-07-09 11:21:54 +02:00
|
|
|
set(CPACK_RPM_APPLICATIONS_PACKAGE_REQUIRES "mylib-libraries")
|
2015-04-27 22:25:09 +02:00
|
|
|
|
2015-08-17 11:37:30 +02:00
|
|
|
# test a "noarch" rpm
|
2016-07-09 11:21:54 +02:00
|
|
|
set(CPACK_RPM_HEADERS_PACKAGE_ARCHITECTURE "noarch")
|
2015-08-17 11:37:30 +02:00
|
|
|
|
|
|
|
# test cross-built rpm
|
2021-09-14 00:13:48 +02:00
|
|
|
set(CPACK_RPM_APPLICATIONS_PACKAGE_ARCHITECTURE "armv7hl")
|
2015-08-17 11:37:30 +02:00
|
|
|
|
|
|
|
# test package summary override - headers rpm is generated in the middle
|
2015-04-27 22:25:09 +02:00
|
|
|
set(CPACK_RPM_PACKAGE_SUMMARY "default summary")
|
2016-07-09 11:21:54 +02:00
|
|
|
set(CPACK_RPM_HEADERS_PACKAGE_SUMMARY "headers summary")
|
2015-08-17 11:37:30 +02:00
|
|
|
|
|
|
|
# test package description override - headers rpm is generated in the middle
|
2016-07-09 11:21:54 +02:00
|
|
|
set(CPACK_RPM_HEADERS_PACKAGE_DESCRIPTION "headers description")
|
2015-04-27 22:25:09 +02:00
|
|
|
|
2015-08-17 11:37:30 +02:00
|
|
|
# test package do not use CPACK_PACKAGING_INSTALL_PREFIX
|
|
|
|
# as relocation path
|
2016-07-09 11:21:54 +02:00
|
|
|
set(CPACK_RPM_NO_LIBRARIES_INSTALL_PREFIX_RELOCATION true)
|
|
|
|
|
|
|
|
# test default permissions
|
|
|
|
set(CPACK_RPM_DEFAULT_USER defusr)
|
|
|
|
set(CPACK_RPM_DEFAULT_GROUP defgrp)
|
|
|
|
set(CPACK_RPM_DEFAULT_FILE_PERMISSIONS
|
|
|
|
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ WORLD_READ)
|
|
|
|
set(CPACK_RPM_DEFAULT_DIR_PERMISSIONS
|
|
|
|
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ WORLD_READ)
|
|
|
|
set(CPACK_RPM_LIBRARIES_DEFAULT_USER user)
|
|
|
|
set(CPACK_RPM_APPLICATIONS_DEFAULT_GROUP group)
|
|
|
|
set(CPACK_RPM_LIBRARIES_DEFAULT_FILE_PERMISSIONS
|
|
|
|
OWNER_READ OWNER_WRITE OWNER_EXECUTE)
|
|
|
|
set(CPACK_RPM_APPLICATIONS_DEFAULT_DIR_PERMISSIONS
|
|
|
|
OWNER_READ GROUP_READ WORLD_READ)
|
2013-03-16 19:13:01 +02:00
|
|
|
endif()
|
2011-02-19 15:09:36 +02:00
|
|
|
|
2011-06-19 15:41:06 +03:00
|
|
|
if(CPACK_GENERATOR MATCHES "DEB")
|
|
|
|
set(CPACK_DEB_COMPONENT_INSTALL "ON")
|
2013-03-16 19:13:01 +02:00
|
|
|
endif()
|
2011-06-19 15:41:06 +03:00
|
|
|
|
2018-08-09 18:06:22 +02:00
|
|
|
if(CPACK_GENERATOR MATCHES "NuGet")
|
|
|
|
set(CPACK_NUGET_COMPONENT_INSTALL "ON")
|
|
|
|
endif()
|
|
|
|
|
2011-02-19 15:09:36 +02:00
|
|
|
#
|
|
|
|
# Choose grouping way
|
|
|
|
#
|
|
|
|
#set(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE)
|
|
|
|
#set(CPACK_COMPONENTS_GROUPING)
|
|
|
|
set(CPACK_COMPONENTS_IGNORE_GROUPS 1)
|
2015-04-27 22:25:09 +02:00
|
|
|
#set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
|