Add CPack RPM/DEB/TGZ support

This commit is contained in:
Aang23 2019-04-09 22:15:41 +02:00 committed by Dawid Drozd
parent 89a376f6cf
commit f45b106dab

View File

@ -109,3 +109,19 @@ install(EXPORT "${TARGETS_EXPORT_NAME}"
DESTINATION "${config_install_dir}"
NAMESPACE "${namespace}"
)
# CPack Configuration
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
set(CPACK_GENERATOR "RPM;DEB;TGZ")
set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
set(CPACK_PACKAGE_RELEASE 1)
set(CPACK_PACKAGE_CONTACT "gelldur")
set(CPACK_PACKAGE_VENDOR "gelldur")
set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}")
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
"/usr/local"
"/usr/local/include"
"/usr/local/lib64"
)
include(CPack)