2019-12-12 01:40:10 +08:00
|
|
|
set(CPACK_GENERATOR "TGZ;ZIP" CACHE STRING "Semicolon separated list of generators")
|
2019-05-18 12:17:46 +08:00
|
|
|
|
|
|
|
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
|
2020-05-02 16:38:14 +08:00
|
|
|
set(CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_BINARY_DIR}" "${PROJECT_NAME}" ALL .)
|
2019-05-18 12:17:46 +08:00
|
|
|
|
|
|
|
set(CPACK_PROJECT_URL "https://github.com/gabime/spdlog")
|
|
|
|
set(CPACK_PACKAGE_VENDOR "Gabi Melman")
|
|
|
|
set(CPACK_PACKAGE_CONTACT "Gabi Melman <gmelman1@gmail.com>")
|
2019-09-27 09:53:04 +08:00
|
|
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Fast C++ logging library")
|
2019-05-18 12:17:46 +08:00
|
|
|
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
|
|
|
|
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
|
|
|
|
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
|
|
|
|
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
|
2020-05-02 16:38:14 +08:00
|
|
|
if(PROJECT_VERSION_TWEAK)
|
2020-05-02 16:42:08 +08:00
|
|
|
set(CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}.${PROJECT_VERSION_TWEAK})
|
2020-05-02 16:38:14 +08:00
|
|
|
endif()
|
2019-12-12 01:40:10 +08:00
|
|
|
set(CPACK_PACKAGE_RELOCATABLE ON CACHE BOOL "Build relocatable package")
|
2019-05-18 12:17:46 +08:00
|
|
|
|
2019-09-27 09:53:04 +08:00
|
|
|
set(CPACK_RPM_PACKAGE_LICENSE "MIT")
|
2019-12-12 01:40:10 +08:00
|
|
|
set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
|
2020-10-21 01:57:56 +08:00
|
|
|
set(CPACK_DEBIAN_PACKAGE_SECTION "libs")
|
2019-09-27 09:53:04 +08:00
|
|
|
set(CPACK_RPM_PACKAGE_URL ${CPACK_PROJECT_URL})
|
2020-10-21 01:57:56 +08:00
|
|
|
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${CPACK_PROJECT_URL})
|
2024-01-13 18:56:56 +08:00
|
|
|
set(CPACK_RPM_PACKAGE_DESCRIPTION "Fast C++ logging library.")
|
|
|
|
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "FastC++ logging library.")
|
2019-09-27 09:53:04 +08:00
|
|
|
|
2020-05-02 16:38:14 +08:00
|
|
|
if(CPACK_PACKAGE_NAME)
|
2020-05-02 16:42:08 +08:00
|
|
|
set(CPACK_RPM_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
|
2020-10-21 01:57:56 +08:00
|
|
|
set(CPACK_DEBIAN_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
|
2019-12-12 01:40:10 +08:00
|
|
|
else()
|
2020-05-02 16:42:08 +08:00
|
|
|
set(CPACK_RPM_FILE_NAME "${PROJECT_NAME}-${CPACK_PACKAGE_VERSION}")
|
2020-10-21 01:57:56 +08:00
|
|
|
set(CPACK_DEBIAN_FILE_NAME "${PROJECT_NAME}-${CPACK_PACKAGE_VERSION}")
|
|
|
|
set(CPACK_RPM_PACKAGE_NAME "${PROJECT_NAME}")
|
|
|
|
set(CPACK_DEBIAN_PACKAGE_NAME "${PROJECT_NAME}")
|
2019-12-12 01:40:10 +08:00
|
|
|
endif()
|
|
|
|
|
2020-05-02 16:38:14 +08:00
|
|
|
if(CPACK_RPM_PACKAGE_RELEASE)
|
2020-05-02 16:42:08 +08:00
|
|
|
set(CPACK_RPM_FILE_NAME "${CPACK_RPM_FILE_NAME}-${CPACK_RPM_PACKAGE_RELEASE}")
|
2020-05-02 16:38:14 +08:00
|
|
|
endif()
|
2020-10-21 01:57:56 +08:00
|
|
|
if(CPACK_DEBIAN_PACKAGE_RELEASE)
|
|
|
|
set(CPACK_DEBIAN_FILE_NAME "${CPACK_DEBIAN_FILE_NAME}-${CPACK_DEBIAN_PACKAGE_RELEASE}")
|
|
|
|
endif()
|
2019-12-12 01:40:10 +08:00
|
|
|
|
2020-05-02 16:38:14 +08:00
|
|
|
if(CPACK_RPM_PACKAGE_ARCHITECTURE)
|
2020-05-02 16:42:08 +08:00
|
|
|
set(CPACK_RPM_FILE_NAME "${CPACK_RPM_FILE_NAME}.${CPACK_RPM_PACKAGE_ARCHITECTURE}")
|
2020-05-02 16:38:14 +08:00
|
|
|
endif()
|
2020-10-21 01:57:56 +08:00
|
|
|
if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
|
|
|
|
set(CPACK_DEBIAN_FILE_NAME "${CPACK_DEBIAN_FILE_NAME}.${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
|
|
|
|
endif()
|
2019-12-12 01:40:10 +08:00
|
|
|
set(CPACK_RPM_FILE_NAME "${CPACK_RPM_FILE_NAME}.rpm")
|
2020-10-21 01:57:56 +08:00
|
|
|
set(CPACK_DEBIAN_FILE_NAME "${CPACK_DEBIAN_FILE_NAME}.deb")
|
2019-12-12 01:40:10 +08:00
|
|
|
|
2020-05-02 16:38:14 +08:00
|
|
|
if(NOT CPACK_PACKAGE_RELOCATABLE)
|
2020-05-02 16:42:08 +08:00
|
|
|
# Depend on pkgconfig rpm to create the system pkgconfig folder
|
|
|
|
set(CPACK_RPM_PACKAGE_REQUIRES pkgconfig)
|
|
|
|
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
|
|
|
|
"${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
2020-05-02 16:38:14 +08:00
|
|
|
endif()
|
2019-12-12 01:40:10 +08:00
|
|
|
|
2019-05-18 12:17:46 +08:00
|
|
|
include(CPack)
|