mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Amend 03eadb1a
, cmake-parsing of AC_INIT line changed
This commit is contained in:
parent
134f3aedaf
commit
43c9ce2d90
@ -337,6 +337,11 @@ endif()
|
||||
macro(setstripped _varname)
|
||||
if(${ARGC} GREATER 1)
|
||||
string(STRIP "${ARGV1}" _v)
|
||||
message(STATUS "1. _v = ${_varname} ${_v}")
|
||||
if (_v MATCHES "^\\[\(.+\)\\]$")
|
||||
set(_v ${CMAKE_MATCH_1})
|
||||
endif()
|
||||
message(STATUS "2. _v = ${_v}")
|
||||
if(USE_POSIX_PACKAGING)
|
||||
string(TOLOWER ${_v} ${_varname})
|
||||
else()
|
||||
@ -349,9 +354,12 @@ 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})
|
||||
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]+\)\)?.*$")
|
||||
set(LYX_MAJOR_VERSION ${CMAKE_MATCH_1})
|
||||
set(LYX_MINOR_VERSION ${CMAKE_MATCH_2})
|
||||
|
Loading…
Reference in New Issue
Block a user