From 43b81becc684460a4276cd31884a890b645a9481 Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Fri, 17 Jan 2020 14:25:57 +0100 Subject: [PATCH] Cmake config: Rename some variables to match the ones used by automake LYX_RELEASE_VERSION renamed to LYX_RELEASE_VERSION and got the new value of LYX_RELEASE_PATCH from configure.ac too --- CMakeLists.txt | 15 +++++++++++---- development/autotests/export.cmake | 2 +- development/cmake/config.h.cmake | 4 ++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fbcc460de7..32a3d3f45f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -371,12 +371,19 @@ foreach(_c_l ${_config_lines} ) setstripped(PACKAGE_BASE ${_PB}) setstripped(PACKAGE_VERSION ${_PV}) setstripped(PACKAGE_BUGREPORT ${_PBU}) - if(PACKAGE_VERSION MATCHES "^\([0-9]+\)\\.\([0-9]+\)\(\\.\([0-9]+\)\)?.*$") + if(PACKAGE_VERSION MATCHES "^\([0-9]+\)\\.\([0-9]+\)\(\\.\([0-9]+\)\(\\.\([0-9]+\)\)?\)?.*$") set(LYX_MAJOR_VERSION ${CMAKE_MATCH_1}) set(LYX_MINOR_VERSION ${CMAKE_MATCH_2}) - set(LYX_RELEASE_VERSION ${CMAKE_MATCH_4}) + set(LYX_RELEASE_LEVEL ${CMAKE_MATCH_4}) + set(LYX_RELEASE_PATCH ${CMAKE_MATCH_6}) 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 (NOT LYX_RELEASE_LEVEL) + set(LYX_RELEASE_LEVEL '0') + endif() + if (NOT LYX_RELEASE_PATCH) + set(LYX_RELEASE_PATCH '0') + endif() if ("${LYX_SUFFIX_VALUE}" MATCHES "") set(LYX_INSTALL_SUFFIX "${LYX_MAJOR_VERSION}.${LYX_MINOR_VERSION}") else() @@ -391,7 +398,7 @@ endforeach(_c_l) FIND_PROGRAM(LYX_GITVERSION git) #message(STATUS "gitversion = ${LYX_GITVERSION}") -set(LYX_REVISION_VERSION ${LYX_RELEASE_VERSION}) +set(LYX_REVISION_VERSION ${LYX_RELEASE_LEVEL}) set(LYX_PACKAGE_RELEASE "1") if(LYX_GITVERSION) if (LYX_LOCALVERSIONING) @@ -404,7 +411,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_RELEASE_VERSION}-${tmp_REVISION_VERSION}git") + set(LYX_REVISION_VERSION "${LYX_RELEASE_LEVEL}-${tmp_REVISION_VERSION}git") set(ENABLE_DIST ON) endif() endif() diff --git a/development/autotests/export.cmake b/development/autotests/export.cmake index 39ddd844cb..e2d9f2e40d 100755 --- a/development/autotests/export.cmake +++ b/development/autotests/export.cmake @@ -257,7 +257,7 @@ if(inverted) else() string(COMPARE NOTEQUAL ${_err} 0 _erg) endif() -execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${TempDir}") +#execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${TempDir}") if(_TestResultMessage) message(STATUS "Msg Summary:") foreach(_l ${_TestResultMessage}) diff --git a/development/cmake/config.h.cmake b/development/cmake/config.h.cmake index ad9292e720..35124161fd 100644 --- a/development/cmake/config.h.cmake +++ b/development/cmake/config.h.cmake @@ -33,8 +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 LYX_RELEASE_LEVEL ${LYX_RELEASE_LEVEL} +#define LYX_RELEASE_PATCH ${LYX_RELEASE_PATCH} #define PROGRAM_SUFFIX "${PROGRAM_SUFFIX}" #define LYX_ABS_INSTALLED_DATADIR "${LYX_ABS_INSTALLED_DATADIR}"