gnucash-docs maint: CMake - revisit project variables

Geert Janssens gjanssens at code.gnucash.org
Fri Sep 13 15:21:43 EDT 2019


Updated	 via  https://github.com/Gnucash/gnucash-docs/commit/9b9a657d (commit)
	from  https://github.com/Gnucash/gnucash-docs/commit/1527cb2f (commit)



commit 9b9a657d8747e8c4969daa85e88f5bb4504ac404
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Fri Sep 13 21:21:36 2019 +0200

    CMake - revisit project variables
    
    - Remove a number of variables we're not using
    - Tweak the 'project' command to set VERSION and use the resulting variables
    - Tell cmake we're not using any of its known languages to avoid checking C/C++ features

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f75ba4d..c299fc4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,21 +2,17 @@
 
 cmake_minimum_required (VERSION 3.5)
 
-project (gnucash-docs)
+# This sets a number of environment variables we can use later on
+# The names of these variables start with PROJECT_ and gnucash-docs_VERSION
+project (gnucash-docs
+    VERSION 3.7
+    LANGUAGES NONE)
 
-# Version number of gnucash
-set (GNUCASH_MAJOR_VERSION 3)
-set (GNUCASH_MINOR_VERSION 7)
-set (VERSION "${GNUCASH_MAJOR_VERSION}.${GNUCASH_MINOR_VERSION}")
-set (GNUCASH_LATEST_STABLE_SERIES 3.x)
-
-set (PACKAGE gnucash-docs)
 set (PACKAGE_NAME GnuCash Docs)
-set (PACKAGE_VERSION 3.7)
 set (PACKAGE_BUGREPORT "https://bugs.gnucash.org/describecomponents.cgi?product=Documentation")
-set (PACKAGE_TARNAME ${PACKAGE})
-set (PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+set (PACKAGE_STRING "${PACKAGE_NAME} ${gnucash-docs_VERSION}")
 set (PACKAGE_URL "https://www.gnucash.org/")
+set (PACKAGE_PREFIX "${PROJECT_NAME}-${gnucash-docs_VERSION}")
 
 # Extra cmake macros
 set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}")
@@ -235,7 +231,6 @@ add_to_dist(
 
 ############################ BEGIN MAKE DIST #################
 
-set(PACKAGE_PREFIX "${PACKAGE}-${PACKAGE_VERSION}")
 set(DIST_FILE "${PACKAGE_PREFIX}.tar")
 
 add_custom_command(OUTPUT ${DIST_FILE}.gz ${DIST_FILE}.bz2



Summary of changes:
 CMakeLists.txt | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)



More information about the gnucash-changes mailing list