From f45b106dab482c03a8b3d92476d6eebc0d627ab1 Mon Sep 17 00:00:00 2001 From: Aang23 Date: Tue, 9 Apr 2019 22:15:41 +0200 Subject: [PATCH] Add CPack RPM/DEB/TGZ support --- lib/CMakeLists.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 8671ff4..ef8d018 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -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) \ No newline at end of file