[LyX/master] Cmake config: Respect the patch-level while creating package from tar/zip-source

Kornel Benko kornel at lyx.org
Fri Jan 17 14:11:32 UTC 2020


commit 1c097e5620c1aae8e346f131eea9ddf845d43bf6
Author: Kornel Benko <kornel at lyx.org>
Date:   Fri Jan 17 15:27:17 2020 +0100

    Cmake config: Respect the patch-level while creating package from tar/zip-source
---
 CMakeLists.txt |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b152ad6..6976776 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -402,7 +402,7 @@ set(LYX_REVISION_VERSION ${LYX_RELEASE_LEVEL})
 set(LYX_PACKAGE_RELEASE "1")
 if(LYX_GITVERSION)
   if (LYX_LOCALVERSIONING)
-    # Find the revision number and for later use
+    # 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)
     if (tmp_LYX_PACKAGE_RELEASE MATCHES "^2\\.0\\.0\\-\([0-9]+\)\\-\(.*\)$")
@@ -415,8 +415,11 @@ if(LYX_GITVERSION)
       set(ENABLE_DIST ON)
     endif()
   endif()
+else()
+  if (LYX_RELEASE_PATCH GREATER 0)
+    set(LYX_REVISION_VERSION "${LYX_RELEASE_LEVEL}.${LYX_RELEASE_PATCH}")
+  endif()
 endif()
-message(STATUS "LYX_REVISION_VERSION = ${LYX_REVISION_VERSION}")
 
 # Set the programs (lyx, tex2lyx, etc.) suffix
 # When building an OS X bundle, we will append


More information about the lyx-cvs mailing list