aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-07-03 08:53:20 +0200
committerPřemysl Eric Janouch <p@janouch.name>2023-07-04 23:26:05 +0200
commit6f596f1dcbee812dd7feff1bc6664cdc7944f2a3 (patch)
tree75b4ed0437387bcab49d39aba0aa53de38aa25f1 /CMakeLists.txt
parentabcff46dc49168125b51a63d10db3eb284d9bcc0 (diff)
downloadxK-6f596f1dcbee812dd7feff1bc6664cdc7944f2a3.tar.gz
xK-6f596f1dcbee812dd7feff1bc6664cdc7944f2a3.tar.xz
xK-6f596f1dcbee812dd7feff1bc6664cdc7944f2a3.zip
Move project version to file, add xS manual page
So far Go applications remain independent to handle Nix's inability to easily combine them with the CMake part. There is also no "install" target, because any packagers will want to adjust installation paths manually, and there is no configure step.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 6 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5e57eb3..2263af0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,11 @@
# Ubuntu 18.04 LTS and OpenBSD 6.4
cmake_minimum_required (VERSION 3.10)
-project (xK VERSION 1.5.0
+
+file (READ xK-version project_version)
+configure_file (xK-version xK-version.tag COPYONLY)
+string (STRIP "${project_version}" project_version)
+
+project (xK VERSION "${project_version}"
DESCRIPTION "IRC daemon, bot, TUI client and its web frontend" LANGUAGES C)
# Options
@@ -18,9 +23,6 @@ if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-function")
endif ()
-# Version
-set (project_version "${PROJECT_VERSION}")
-
# Try to append commit ID if it follows a version tag. It might be nicer if
# we could also detect dirty worktrees but that's very hard to get right.
# If we didn't need this for CPack, we could use add_custom_command to generate