use cpack to provide package build target

This commit is contained in:
walker0643 2018-03-19 13:16:06 -04:00
parent d75bdb8ec0
commit 12ed71250a
2 changed files with 8 additions and 3 deletions

View File

@ -31,10 +31,8 @@ if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions (-DNDEBUG) add_definitions (-DNDEBUG)
endif() endif()
#
# Barrier version
#
include (cmake/Version.cmake) include (cmake/Version.cmake)
include (cmake/Package.cmake)
# TODO: Find out why we need these, and remove them # TODO: Find out why we need these, and remove them
if (COMMAND cmake_policy) if (COMMAND cmake_policy)

7
cmake/Package.cmake Normal file
View File

@ -0,0 +1,7 @@
if (UNIX)
set (CPACK_PACKAGE_VERSION_MAJOR ${BARRIER_VERSION_MAJOR})
set (CPACK_PACKAGE_VERSION_MINOR ${BARRIER_VERSION_MINOR})
set (CPACK_PACKAGE_VERSION_PATCH ${BARRIER_VERSION_PATCH})
set (CPACK_GENERATOR "TBZ2")
include (CPack)
endif()