From 12ed71250a34f8340f68cb0f71514be0d7c85b97 Mon Sep 17 00:00:00 2001 From: walker0643 <> Date: Mon, 19 Mar 2018 13:16:06 -0400 Subject: [PATCH] use cpack to provide package build target --- CMakeLists.txt | 4 +--- cmake/Package.cmake | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 cmake/Package.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index c81584d2..5c4ba6de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,10 +31,8 @@ if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") add_definitions (-DNDEBUG) endif() -# -# Barrier version -# include (cmake/Version.cmake) +include (cmake/Package.cmake) # TODO: Find out why we need these, and remove them if (COMMAND cmake_policy) diff --git a/cmake/Package.cmake b/cmake/Package.cmake new file mode 100644 index 00000000..95b9a03b --- /dev/null +++ b/cmake/Package.cmake @@ -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()