From 6f596f1dcbee812dd7feff1bc6664cdc7944f2a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Mon, 3 Jul 2023 08:53:20 +0200 Subject: 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. --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') 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 -- cgit v1.2.3