mirror of
https://github.com/gelldur/EventBus.git
synced 2024-12-27 12:21:02 +08:00
Split and update CPack configuration
This commit is contained in:
parent
a8669fddc8
commit
427652522e
@ -7,11 +7,17 @@ project(EventBusDev)
|
||||
|
||||
option(ENABLE_TEST "Enable test" ON)
|
||||
option(ENABLE_PERFORMANCE "Enable performance subproject" OFF)
|
||||
option(ENABLE_CPACK "Enable CPack packaging" ON)
|
||||
|
||||
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/)
|
||||
|
@ -109,20 +109,3 @@ 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
|
||||
"${CMAKE_INSTALL_PREFIX}"
|
||||
"${CMAKE_INSTALL_PREFIX}/include"
|
||||
"${CMAKE_INSTALL_PREFIX}/lib64"
|
||||
"${CMAKE_INSTALL_PREFIX}/lib"
|
||||
)
|
||||
include(CPack)
|
18
lib/cmake/EventBus_CPack.cmake
Normal file
18
lib/cmake/EventBus_CPack.cmake
Normal file
@ -0,0 +1,18 @@
|
||||
# CPack Configuration
|
||||
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")
|
||||
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
|
||||
"${CMAKE_INSTALL_PREFIX}"
|
||||
"${CMAKE_INSTALL_PREFIX}/include"
|
||||
"${CMAKE_INSTALL_PREFIX}/lib64"
|
||||
"${CMAKE_INSTALL_PREFIX}/lib"
|
||||
)
|
||||
include(CPack)
|
||||
endfunction()
|
Loading…
x
Reference in New Issue
Block a user