diff --git a/CMakeLists.txt b/CMakeLists.txt index 3caee01..dfd603b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,11 @@ set(CMAKE_CXX_STANDARD 14) add_subdirectory(lib/) +if(ENABLE_CPACK) + include("lib/cmake/EventBus_CPack.cmake") + enable_cpack("RPM;DEB;TGZ") +endif() + if(ENABLE_TEST) enable_testing() add_subdirectory(test/) diff --git a/lib/cmake/EventBus_CPack.cmake b/lib/cmake/EventBus_CPack.cmake index 21e686a..c47b861 100644 --- a/lib/cmake/EventBus_CPack.cmake +++ b/lib/cmake/EventBus_CPack.cmake @@ -1,6 +1,7 @@ # CPack Configuration -function(enable_cpack) +function(enable_cpack generator) set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) + set(CPACK_GENERATOR ${generator}) set(CPACK_PACKAGE_NAME ${PROJECT_NAME}) set(CPACK_PACKAGE_RELEASE 1) set(CPACK_PACKAGE_CONTACT "gelldur")