From 08afacc239e5f3b6805e082f40038c4b34b9cebd Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Sun, 3 Jun 2018 09:16:55 +0200 Subject: [PATCH] Cmake build: Adapt use of some variables 1.) Rename LYX_PATCH_VERSION to LYX_RELEASE_VERSION. This matches the use in automake. 2.) Don't display LYX_DATE at configure time. This value is evaluated later at build time --- CMakeLists.txt | 8 ++++---- development/cmake/config.h.cmake | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index adef77b77a..790dfdaeaf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -338,7 +338,7 @@ foreach(_c_l ${_config_lines} ) if(PACKAGE_VERSION MATCHES "^\([0-9]+\)\\.\([0-9]+\)\(\\.\([0-9]+\)\)?.*$") set(LYX_MAJOR_VERSION ${CMAKE_MATCH_1}) set(LYX_MINOR_VERSION ${CMAKE_MATCH_2}) - set(LYX_PATCH_VERSION ${CMAKE_MATCH_4}) + set(LYX_RELEASE_VERSION ${CMAKE_MATCH_4}) set(LYX_DIR_VER "LYX_DIR_${CMAKE_MATCH_1}${CMAKE_MATCH_2}x") set(LYX_USERDIR_VER "LYX_USERDIR_${CMAKE_MATCH_1}${CMAKE_MATCH_2}x") if ("${LYX_SUFFIX_VALUE}" MATCHES "") @@ -355,7 +355,7 @@ endforeach(_c_l) FIND_PROGRAM(LYX_GITVERSION git) #message(STATUS "gitversion = ${LYX_GITVERSION}") -set(LYX_REVISION_VERSION ${LYX_PATCH_VERSION}) +set(LYX_REVISION_VERSION ${LYX_RELEASE_VERSION}) set(LYX_PACKAGE_RELEASE "1") if(LYX_GITVERSION) if (LYX_LOCALVERSIONING) @@ -368,7 +368,7 @@ if(LYX_GITVERSION) # previous svn. # We use this value than also to set the package-patch-value MATH(EXPR tmp_REVISION_VERSION "(${CMAKE_MATCH_1}+40000)") - set(LYX_REVISION_VERSION "${LYX_PATCH_VERSION}-${tmp_REVISION_VERSION}git") + set(LYX_REVISION_VERSION "${LYX_RELEASE_VERSION}-${tmp_REVISION_VERSION}git") set(ENABLE_DIST ON) endif() endif() @@ -855,7 +855,7 @@ endif() message(STATUS "") foreach(_v PACKAGE PACKAGE_VERSION - PROGRAM_SUFFIX LYX_DATE LYX_DIR_VER LYX_USERDIR_VER + PROGRAM_SUFFIX LYX_DIR_VER LYX_USERDIR_VER LYX_ABS_TOP_SRCDIR LYX_ABS_INSTALLED_DATADIR LYX_ABS_INSTALLED_LOCALEDIR LYX_INSTALL_SUFFIX) if(NOT DEFINED ${_v}) diff --git a/development/cmake/config.h.cmake b/development/cmake/config.h.cmake index fd08c45587..ad9292e720 100644 --- a/development/cmake/config.h.cmake +++ b/development/cmake/config.h.cmake @@ -33,6 +33,8 @@ #cmakedefine LYX_USERDIR_VER "${LYX_USERDIR_VER}" #define LYX_MAJOR_VERSION ${LYX_MAJOR_VERSION} #define LYX_MINOR_VERSION ${LYX_MINOR_VERSION} +#define LYX_RELEASE_LEVEL ${LYX_RELEASE_VERSION} +#define LYX_RELEASE_PATCH 0 #define PROGRAM_SUFFIX "${PROGRAM_SUFFIX}" #define LYX_ABS_INSTALLED_DATADIR "${LYX_ABS_INSTALLED_DATADIR}"