summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRolf Eike Beer <eb@emlix.com>2022-09-21 10:22:57 +0200
committerGlenn Strauss <gstrauss@gluelogic.com>2022-09-23 03:39:22 -0400
commit45124ba69914e2874164fcb0de1aed136cc34b24 (patch)
tree52779991528a81aee344e5875fe67d1fcc56b2c1 /CMakeLists.txt
parentf98cc6743821b8bfa342dabb9a7d5a06ce6b93fe (diff)
downloadlighttpd-git-45124ba69914e2874164fcb0de1aed136cc34b24.tar.gz
[cmake] let CMake handle the version number
The CPack module automatically uses the version information set for the current project. While at it include the CPack module to get targets like "make package". set PACKAGE_VERSION to $PROJECT_VERSION ($CMAKE_PROJECT_VERSION available starting with cmake 3.12.x (?)) github: closes #119
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 3 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a78ff7e7..8845104c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
-project(lighttpd C)
-
cmake_minimum_required(VERSION 3.7.0 FATAL_ERROR)
+project(lighttpd VERSION 1.4.68 LANGUAGES C)
+
# use C11 with CMake >= 3.1
set(CMAKE_C_STANDARD 11)
@@ -11,11 +11,6 @@ include(CTest)
enable_testing()
-set(CPACK_PACKAGE_VERSION_MAJOR 1)
-set(CPACK_PACKAGE_VERSION_MINOR 4)
-set(CPACK_PACKAGE_VERSION_PATCH 68)
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README")
set(CPACK_PACKAGE_VENDOR "jan@kneschke.de")
@@ -23,7 +18,7 @@ set(CPACK_PACKAGE_VENDOR "jan@kneschke.de")
set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_SOURCE_IGNORE_FILES "/\\\\.;~$;/_;build/;CMakeFiles/;CMakeCache;gz$;Makefile\\\\.;trace;Testing/;foo;autom4te;cmake_install;CPack;\\\\.pem;ltmain.sh;configure;libtool;/config\\\\.;missing;autogen.sh;install-sh;Dart;aclocal;log$;Makefile$")
-set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+include(CPack)
include(GNUInstallDirs)