mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Housekeeping - reduce the number of PACKAGE and VERSION related cmake variables
This starts by setting the gnucash version number in the 'project' call. This will result in a number of variables set by cmake. The remainder of this commit is to reuse the auto-generated PROJECT_NAME, PROJECT_VERSION, PROJECT_VERSION_MAJOR PROJECT_VERSION_MINOR, PROJECT_VERSION_PATCH and PROJECT_VERSION_TWEAK instead of all the various instances of PACKAGE, GNUCASH_MAJOR_VERSION and so on. One parameter is worth mentioning - GETTEXT_PACKAGE GnuCash is not using this directly (any more) but it has to be set before including gi18n-lib.h.
This commit is contained in:
@@ -2,22 +2,18 @@
|
||||
|
||||
cmake_minimum_required (VERSION 3.5)
|
||||
|
||||
project (gnucash)
|
||||
project (gnucash
|
||||
VERSION 3.8
|
||||
)
|
||||
|
||||
enable_testing()
|
||||
|
||||
# Version number of gnucash
|
||||
set (GNUCASH_MAJOR_VERSION 3)
|
||||
set (GNUCASH_MINOR_VERSION 8)
|
||||
set (VERSION "${GNUCASH_MAJOR_VERSION}.${GNUCASH_MINOR_VERSION}")
|
||||
set (GNUCASH_LATEST_STABLE_SERIES 3.x)
|
||||
|
||||
set (PACKAGE gnucash)
|
||||
set (PACKAGE_NAME GnuCash)
|
||||
set (PACKAGE_VERSION 3.8)
|
||||
set (PACKAGE_BUGREPORT "https://bugs.gnucash.org")
|
||||
set (PACKAGE_TARNAME ${PACKAGE})
|
||||
set (PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
|
||||
set (PACKAGE_STRING "${PACKAGE_NAME} ${PROJECT_VERSION}")
|
||||
set (PACKAGE_URL "https://www.gnucash.org/")
|
||||
|
||||
# Change this in development versions when changing anything that
|
||||
@@ -25,8 +21,6 @@ set (PACKAGE_URL "https://www.gnucash.org/")
|
||||
|
||||
set (GNUCASH_RESAVE_VERSION "19920")
|
||||
|
||||
set(GETTEXT_PACKAGE "gnucash")
|
||||
|
||||
# Clear cache variables that will be filled later during the cmake run
|
||||
unset(dist_generated CACHE)
|
||||
unset(dist_generated_depends CACHE)
|
||||
@@ -672,8 +666,6 @@ install(FILES ${gnucash_DOCS} DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
|
||||
# Create config.h
|
||||
|
||||
set (GETTEXT_PACKAGE "gnucash")
|
||||
|
||||
if (WIN32)
|
||||
if (MINGW)
|
||||
set (HAVE_SCANF_LLD 1)
|
||||
@@ -828,7 +820,7 @@ dist_add_generated (${BUILDING_FROM_VCS} ChangeLog)
|
||||
|
||||
############################ BEGIN MAKE DIST #################
|
||||
|
||||
set(PACKAGE_PREFIX "${PACKAGE}-${PACKAGE_VERSION}")
|
||||
set(PACKAGE_PREFIX "${PROJECT_NAME}-${PROJECT_VERSION}")
|
||||
set(DIST_FILE "${PACKAGE_PREFIX}.tar")
|
||||
|
||||
set(toplvl_DIST_local ${gnucash_DOCS}
|
||||
@@ -962,10 +954,6 @@ endif()
|
||||
# ############################################################
|
||||
# Package creation rules
|
||||
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR "${GNUCASH_MAJOR_VERSION}")
|
||||
set(CPACK_PACKAGE_VERSION_MINOR "${GNUCASH_MINOR_VERSION}")
|
||||
set(CPACK_PACKAGE_VERSION "${VERSION}")
|
||||
|
||||
if(UNIX)
|
||||
set(CPACK_GENERATOR "TGZ")
|
||||
endif(UNIX)
|
||||
|
||||
Reference in New Issue
Block a user