diff --git a/CMakeLists.txt b/CMakeLists.txt index 32428f1..3caee01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,16 +8,12 @@ project(EventBusDev) option(ENABLE_TEST "Enable test" ON) option(ENABLE_PERFORMANCE "Enable performance subproject" OFF) option(ENABLE_CPACK "Enable CPack packaging" ON) +set(CPACK_GENERATOR "" CACHE STRING "Set packages CPack should build") 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/CMakeLists.txt b/lib/CMakeLists.txt index 8671ff4..79806d5 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -109,3 +109,9 @@ install(EXPORT "${TARGETS_EXPORT_NAME}" DESTINATION "${config_install_dir}" NAMESPACE "${namespace}" ) + +# Cpack configuration +if(ENABLE_CPACK) + include("cmake/EventBus_CPack.cmake") + enable_cpack() +endif() diff --git a/lib/cmake/EventBus_CPack.cmake b/lib/cmake/EventBus_CPack.cmake index c47b861..21e686a 100644 --- a/lib/cmake/EventBus_CPack.cmake +++ b/lib/cmake/EventBus_CPack.cmake @@ -1,7 +1,6 @@ # CPack Configuration -function(enable_cpack generator) +function(enable_cpack) 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")