diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2023-07-03 08:53:20 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2023-07-04 23:26:05 +0200 |
commit | 6f596f1dcbee812dd7feff1bc6664cdc7944f2a3 (patch) | |
tree | 75b4ed0437387bcab49d39aba0aa53de38aa25f1 /CMakeLists.txt | |
parent | abcff46dc49168125b51a63d10db3eb284d9bcc0 (diff) | |
download | xK-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.txt | 10 |
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 |