25 lines
1.1 KiB
CMake
25 lines
1.1 KiB
CMake
# Общие настройки для пакета: организация, автор, версия
|
|
set(CPACK_PACKAGE_VENDOR ${CMLIB_ORGANIZATION_NAME_LOWER})
|
|
set(CPACK_PACKAGE_NAME ${CMLIB_PROJECT_NAME_LOWER})
|
|
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
|
|
|
|
# Параметры для архива исходных текстов
|
|
set(CPACK_SOURCE_GENERATOR TXZ)
|
|
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMLIB_PROJECT_NAME_LOWER}-${CPACK_PACKAGE_VERSION}")
|
|
|
|
# Параметры для архива собранного проекта
|
|
set(CPACK_TARGET_ARCH ${CMAKE_SYSTEM_PROCESSOR})
|
|
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
|
set(CPACK_TARGET_ARCH "amd64")
|
|
endif()
|
|
set(CPACK_PACKAGE_FILE_NAME "${CMLIB_PROJECT_NAME_LOWER}_${CPACK_TARGET_ARCH}_${CPACK_PACKAGE_VERSION}")
|
|
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMLIB_PROJECT_NAME_LOWER}-${CPACK_PACKAGE_VERSION}")
|
|
|
|
set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_CURRENT_LIST_DIR}/CMLibCPackProject.cmake)
|
|
|
|
# Правила для сборки пакетов для Debian
|
|
include(CMLibCPackDeb)
|
|
|
|
# Подключение модуля, выполняющего сборку архивов и пакетов
|
|
include(CPack)
|