[LyX/2.3.x] Adapt to change of AC_INIT in configure.ac.
Kornel Benko
kornel at lyx.org
Tue Nov 15 12:46:55 UTC 2022
commit 22e78cae811b4e71e1c5031e8c35ef5e2d100371
Author: Kornel Benko <kornel at lyx.org>
Date: Tue Nov 15 14:38:56 2022 +0100
Adapt to change of AC_INIT in configure.ac.
Amends 2849127f44e, missed it at that time
---
CMakeLists.txt | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1cff7fe..65360fa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -346,6 +346,9 @@ endif()
macro(setstripped _varname)
if(${ARGC} GREATER 1)
string(STRIP "${ARGV1}" _v)
+ if (_v MATCHES "^\\[\(.+\)\\]$")
+ set(_v ${CMAKE_MATCH_1})
+ endif()
if(USE_POSIX_PACKAGING)
string(TOLOWER ${_v} ${_varname})
else()
@@ -358,10 +361,13 @@ endmacro(setstripped)
foreach(_c_l ${_config_lines} )
if(_c_l MATCHES "^AC_INIT\\(\([^,]+\),\([^,]+\), *\\[\([^,]+\)\\] *,\(.*\)")
- setstripped(PACKAGE_BASE ${CMAKE_MATCH_1})
- setstripped(PACKAGE_VERSION ${CMAKE_MATCH_2})
- setstripped(PACKAGE_BUGREPORT ${CMAKE_MATCH_3})
- if(PACKAGE_VERSION MATCHES "^\([0-9]+\)\\.\([0-9]+\)\(\\.\([0-9]+\)\(\\.\([0-9]+\)\)?\)?.*$")
+ set(_PB ${CMAKE_MATCH_1})
+ set(_PV ${CMAKE_MATCH_2})
+ set(_PBU ${CMAKE_MATCH_3})
+ setstripped(PACKAGE_BASE ${_PB})
+ setstripped(PACKAGE_VERSION ${_PV})
+ setstripped(PACKAGE_BUGREPORT ${_PBU})
+ if(PACKAGE_VERSION MATCHES "^\([0-9]+\)\\.\([0-9]+\)\(\\.\([0-9]+\)\(\\.\([0-9]+\)\)?\)?-?\([a-z]*[0-9]*\).*$")
set(LYX_MAJOR_VERSION ${CMAKE_MATCH_1})
set(LYX_MINOR_VERSION ${CMAKE_MATCH_2})
set(LYX_RELEASE_LEVEL ${CMAKE_MATCH_4})
More information about the lyx-cvs
mailing list