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
This commit is contained in:
Kornel Benko 2020-01-17 14:25:57 +01:00
parent 019f297a54
commit 43b81becc6
3 changed files with 14 additions and 7 deletions

View File

@ -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()

View File

@ -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})

View File

@ -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}"