summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2014-07-23 01:17:42 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2014-11-09 21:37:15 +0000
commitba586e7e8fcc4536d633f9ef74046474b9837856 (patch)
treec8398cc4a47650d46232af528b0fde3676c465ae /CMakeLists.txt
parentf16fe1afaa0ecca217d5f90d9f2255ffd570f63a (diff)
cmake: include the CPACK module
Will be used to ease distribution of binary tarballs. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ff1c222..d6c804b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -154,3 +154,25 @@ install(
# ------------------------------------------------------------------------------
include(WafflePrintConfigurationSummary)
+
+set (CPACK_SET_DESTDIR ON)
+set (CPACK_PACKAGE_VERSION_MAJOR ${waffle_major_version})
+set (CPACK_PACKAGE_VERSION_MINOR ${waffle_minor_version})
+set (CPACK_PACKAGE_VERSION_PATCH ${waffle_patch_version})
+
+# cpack detects win64 vs win32 only when msvc is available
+# reported upstream, fix (likely post cmake 3.0) pending
+if (MINGW)
+ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set (CPACK_SYSTEM_NAME win64)
+ endif ()
+endif ()
+
+# See http://www.vtk.org/Wiki/CMake:CPackPackageGenerators
+if (WIN32)
+ set (CPACK_GENERATOR "ZIP")
+else ()
+ set (CPACK_GENERATOR "TBZ2")
+endif ()
+
+include(CPack)