gnucash unstable: Set GNC_VCS at build time instead of when making the tarball.

John Ralls jralls at code.gnucash.org
Mon Apr 9 18:11:43 EDT 2018


Updated	 via  https://github.com/Gnucash/gnucash/commit/192a3c3d (commit)
	from  https://github.com/Gnucash/gnucash/commit/ba3bf37d (commit)



commit 192a3c3d2b18e5440c9faa4942d577adf1aeb0c0
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon Apr 9 15:10:25 2018 -0700

    Set GNC_VCS at build time instead of when making the tarball.
    
    Because the tarball is always made from a VCS repo.

diff --git a/gnucash/CMakeLists.txt b/gnucash/CMakeLists.txt
index fc31390..39481d2 100644
--- a/gnucash/CMakeLists.txt
+++ b/gnucash/CMakeLists.txt
@@ -59,6 +59,10 @@ ADD_DEPENDENCIES (gnucash gnucash-manpage)
 
 TARGET_COMPILE_DEFINITIONS(gnucash PRIVATE -DG_LOG_DOMAIN=\"gnc.bin\")
 
+if (BUILDING_FROM_VCS)
+  TARGET_COMPILE_DEFINITIONS(gncmod-gnome-utils PRIVATE -DGNC_VCS=\"git\")
+endif (BUILDING_FROM_VCS)
+
 TARGET_LINK_LIBRARIES (gnucash
    gncmod-ledger-core gncmod-report-gnome gnc-gnome gncmod-gnome-utils gncmod-app-utils
    gncmod-engine gnc-module gnc-core-utils gncmod-report-system
diff --git a/gnucash/gnome-utils/CMakeLists.txt b/gnucash/gnome-utils/CMakeLists.txt
index 855d684..c947189 100644
--- a/gnucash/gnome-utils/CMakeLists.txt
+++ b/gnucash/gnome-utils/CMakeLists.txt
@@ -215,7 +215,11 @@ TARGET_LINK_LIBRARIES(gncmod-gnome-utils gncmod-app-utils gncmod-engine gnc-back
      ${CMAKE_DL_LIBS} ${GTK3_LDFLAGS} ${GTK_MAC_LDFLAGS})
 
 TARGET_COMPILE_DEFINITIONS(gncmod-gnome-utils PUBLIC ${GTK_MAC_CFLAGS_OTHER}
-    PRIVATE -DG_LOG_DOMAIN=\"gnc.gui\")
+  PRIVATE -DG_LOG_DOMAIN=\"gnc.gui\")
+
+if (BUILDING_FROM_VCS)
+  TARGET_COMPILE_DEFINITIONS(gncmod-gnome-utils PRIVATE -DGNC_VCS=\"git\")
+endif (BUILDING_FROM_VCS)
 
 IF (MAC_INTEGRATION)
   TARGET_COMPILE_OPTIONS(gncmod-gnome-utils PRIVATE ${OSX_EXTRA_COMPILE_FLAGS})
diff --git a/libgnucash/core-utils/CMakeLists.txt b/libgnucash/core-utils/CMakeLists.txt
index befab78..98641fb 100644
--- a/libgnucash/core-utils/CMakeLists.txt
+++ b/libgnucash/core-utils/CMakeLists.txt
@@ -54,7 +54,6 @@ SET (GNC_VERSION_H_IN
 #ifndef GNC_VERSION_H
 #define GNC_VERSION_H
 
-#define GNC_VCS \"git\"
 #include \"gnc-vcs-info.h\"
 #endif
 ")



Summary of changes:
 gnucash/CMakeLists.txt               | 4 ++++
 gnucash/gnome-utils/CMakeLists.txt   | 6 +++++-
 libgnucash/core-utils/CMakeLists.txt | 1 -
 3 files changed, 9 insertions(+), 2 deletions(-)



More information about the gnucash-changes mailing list