mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Cmake build: Amend 1c097e56
, correctly respect the patch-level
Handle also the case of creating from tar-file _and_ having 'git' installed
(cherry picked from commit cd3f11e585
)
This commit is contained in:
parent
42764fd481
commit
a0c768b397
@ -389,12 +389,17 @@ endforeach(_c_l)
|
||||
FIND_PROGRAM(LYX_GITVERSION git)
|
||||
#message(STATUS "gitversion = ${LYX_GITVERSION}")
|
||||
set(LYX_REVISION_VERSION ${LYX_RELEASE_LEVEL})
|
||||
set(LYX_PACKAGE_RELEASE "1")
|
||||
set(LYX_PACKAGE_RELEASE "UNDEFINED")
|
||||
if(LYX_GITVERSION)
|
||||
if (LYX_LOCALVERSIONING)
|
||||
# Find the revision number for later use
|
||||
EXECUTE_PROCESS(COMMAND ${LYX_GITVERSION} describe --match 2.0.0 HEAD
|
||||
WORKING_DIRECTORY "${TOP_SRC_DIR}" OUTPUT_VARIABLE tmp_LYX_PACKAGE_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
WORKING_DIRECTORY "${TOP_SRC_DIR}"
|
||||
RESULT_VARIABLE tmp_GIT_RESULT
|
||||
OUTPUT_VARIABLE tmp_LYX_PACKAGE_RELEASE
|
||||
ERROR_VARIABLE tmp_GIT_ERROR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if (tmp_GIT_RESULT EQUAL 0)
|
||||
if (tmp_LYX_PACKAGE_RELEASE MATCHES "^2\\.0\\.0\\-\([0-9]+\)\\-\(.*\)$")
|
||||
set(LYX_PACKAGE_RELEASE ${CMAKE_MATCH_2})
|
||||
# We will add offset of 40000 to get appropriate value to
|
||||
@ -405,7 +410,10 @@ if(LYX_GITVERSION)
|
||||
set(ENABLE_DIST ON)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
endif()
|
||||
endif()
|
||||
if (LYX_PACKAGE_RELEASE MATCHES "UNDEFINED")
|
||||
set(LYX_PACKAGE_RELEASE "1")
|
||||
if (LYX_RELEASE_PATCH GREATER 0)
|
||||
set(LYX_REVISION_VERSION "${LYX_RELEASE_LEVEL}.${LYX_RELEASE_PATCH}")
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user