Improved LYX_BUILD_TYPE detection for cmake - case insensitive AC_INIT processing

This commit is contained in:
Stephan Witt 2023-06-19 08:00:08 +02:00
parent 2bbc420032
commit f88986eff5

View File

@ -430,12 +430,13 @@ function(determineversionandbuildtype configfile package version dirs date build
setstripped(PACKAGE_VERSION ${_PV}) setstripped(PACKAGE_VERSION ${_PV})
setstripped(PACKAGE_BUGREPORT ${_PBU}) setstripped(PACKAGE_BUGREPORT ${_PBU})
set(${package} ${PACKAGE_BASE} ${PACKAGE_VERSION} ${PACKAGE_BUGREPORT} PARENT_SCOPE) set(${package} ${PACKAGE_BASE} ${PACKAGE_VERSION} ${PACKAGE_BUGREPORT} PARENT_SCOPE)
if(PACKAGE_VERSION MATCHES "^\([0-9]+\)\\.\([0-9]+\)\(\\.\([0-9]+\)\(\\.\([0-9]+\)\)?\)?-?\([a-z]*[0-9]*\).*$") if(PACKAGE_VERSION MATCHES "^\([0-9]+\)\\.\([0-9]+\)\(\\.\([0-9]+\)\(\\.\([0-9]+\)\)?\)?-?\([A-Za-z]*[0-9]*\).*$")
set(LYX_MAJOR_VERSION ${CMAKE_MATCH_1}) set(LYX_MAJOR_VERSION ${CMAKE_MATCH_1})
set(LYX_MINOR_VERSION ${CMAKE_MATCH_2}) set(LYX_MINOR_VERSION ${CMAKE_MATCH_2})
set(LYX_RELEASE_LEVEL ${CMAKE_MATCH_4}) set(LYX_RELEASE_LEVEL ${CMAKE_MATCH_4})
set(LYX_RELEASE_PATCH ${CMAKE_MATCH_6}) set(LYX_RELEASE_PATCH ${CMAKE_MATCH_6})
set(LYX_BUILD_TYPE ${CMAKE_MATCH_7}) set(LYX_BUILD_TYPE_MATCH ${CMAKE_MATCH_7})
string(TOLOWER "${LYX_BUILD_TYPE_MATCH}" LYX_BUILD_TYPE)
set(LYX_DIR_VER "LYX_DIR_${CMAKE_MATCH_1}${CMAKE_MATCH_2}x") 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") set(LYX_USERDIR_VER "LYX_USERDIR_${CMAKE_MATCH_1}${CMAKE_MATCH_2}x")
if (NOT LYX_RELEASE_LEVEL) if (NOT LYX_RELEASE_LEVEL)