gnucash maint: Make CMake use the same scm-revision program as Autotools.

John Ralls jralls at code.gnucash.org
Tue Jul 5 12:56:38 EDT 2016


Updated	 via  https://github.com/Gnucash/gnucash/commit/b64fe864 (commit)
	from  https://github.com/Gnucash/gnucash/commit/a1b574af (commit)



commit b64fe864e98dc39aa8ef222a1803457e7d1d32aa
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Jul 5 09:56:11 2016 -0700

    Make CMake use the same scm-revision program as Autotools.
    
    So that the Win32 build script has the right file name to copy to code's download folder.

diff --git a/src/core-utils/CMakeLists.txt b/src/core-utils/CMakeLists.txt
index c5af60c..80e59f3 100644
--- a/src/core-utils/CMakeLists.txt
+++ b/src/core-utils/CMakeLists.txt
@@ -69,10 +69,10 @@ FIND_PACKAGE(Git)
 FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/gnc-vcs-info.h.in
    "/* Autogenerated. Do not change. */\n#define GNUCASH_SCM_REV \"@GNUCASH_SCM_REV@\"\n"
 )
-
+SET(SCM_REV_COMMAND "${CMAKE_SOURCE_DIR}/util/gnc-vcs-info -r")
 FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/version.cmake
   "EXECUTE_PROCESS(
-    COMMAND ${GIT_EXECUTABLE} --git-dir ${CMAKE_SOURCE_DIR}/.git log -1 --pretty=format:%h HEAD
+    COMMAND ${SCM_REV_COMMAND} ${CMAKE_SOURCE_DIR}
     OUTPUT_VARIABLE GNUCASH_SCM_REV
     OUTPUT_STRIP_TRAILING_WHITESPACE
   )



Summary of changes:
 src/core-utils/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



More information about the gnucash-changes mailing list