From c7653811a66bf8f3e87506d24e2f6afd2a8f1322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Thu, 18 Apr 2019 13:46:02 +0200 Subject: [PATCH] Add basic CPack support @ThijsWithaar is responsible for giving me the idea, but his PR had couple of things that meant it was simpler to rewrite it than to fix and merge it. Supersedes and closes #1599 --- CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 66091046..549ee178 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -205,4 +205,15 @@ if (NOT_SUBPROJECT) ${PKGCONFIG_INSTALL_DIR} ) + # CPack/CMake started taking the package version from project version 3.12 + # So we need to set the version manually for older CMake versions + if(${CMAKE_VERSION} VERSION_LESS "3.12.0") + set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) + endif() + + set(CPACK_PACKAGE_CONTACT "https://github.com/catchorg/Catch2/") + + + include( CPack ) + endif(NOT_SUBPROJECT)