gnucash master: Multiple changes pushed
Geert Janssens
gjanssens at code.gnucash.org
Sun Oct 6 15:57:00 EDT 2019
Updated via https://github.com/Gnucash/gnucash/commit/75073a7a (commit)
via https://github.com/Gnucash/gnucash/commit/f28cf416 (commit)
from https://github.com/Gnucash/gnucash/commit/1eb22c09 (commit)
commit 75073a7ab22b7feb701ebf51f4fc0873456ec662
Author: Geert Janssens <geert at kobaltwit.be>
Date: Sun Oct 6 21:27:10 2019 +0200
Tweak install rule to be able to compile glib's schema's on Windows as well
It's a bit of a hack based on the assumption DESTDIR is never set on Windows.
A install time guard is added to assert this.
It needed a few changes to make this working:
- Have cmake expand DESTDIR instead of delaying this to bash
If not, bash would see "$DESTDIRC:/gcdev64/..." and we'd loose
the drive letter in bash' expansion of $DESTDIRC.
So work with $ENV{DESTDIR} instead
- To prevent cmake from already expanding this in the
build system generation step add the appropriate escapes to
that variable.
- Add guard code in the install command that asserts
DESTDIR is not set on Windows. Use similar escapes as
necessary to ensure the evaluation happens at install time
rather than in the generation step.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7d579b2b8..5db6b97e7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -84,6 +84,8 @@ foreach(install_dir ${CMAKE_INSTALL_FULL_BINDIR}
break()
endif()
endforeach()
+message(STATUS "CMAKE_INSTALL_FULL_DATADIR: ${CMAKE_INSTALL_FULL_DATADIR}")
+message(STATUS "DESTDIR: ${DESTDIR}")
# GnuCash installs two files in ${CMAKE_INSTALL_SYSCONFDIR}
set(BINDIR ${CMAKE_INSTALL_BINDIR} CACHE STRING "user executables")
diff --git a/gnucash/gschemas/CMakeLists.txt b/gnucash/gschemas/CMakeLists.txt
index 0b1fcb91b..735e5c11d 100644
--- a/gnucash/gschemas/CMakeLists.txt
+++ b/gnucash/gschemas/CMakeLists.txt
@@ -32,10 +32,20 @@ if (COMPILE_GSCHEMAS)
add_custom_target(compiled-schemas ALL DEPENDS ${SCHEMADIR_BUILD}/gschemas.compiled)
-
- install(CODE "execute_process(
- COMMAND ${SHELL} -c \"echo Compiling gschema files in $DESTDIR${CMAKE_INSTALL_FULL_DATADIR}/glib-2.0/schemas ;
- ${GLIB_COMPILE_SCHEMAS} $DESTDIR${CMAKE_INSTALL_FULL_DATADIR}/glib-2.0/schemas\")")
+ # On Windows concatenating two absolute paths results in an invalid path (having two drive letters)
+ # If DESTDIR is not set on the other hand, the below install command works just fine
+ # So verify DESTDIR is not set on Windows
+ # Note we have to do this at build time, not configure time so the guard is part of the custom install command
+ install(CODE "
+ if (WIN32)
+ set (DESTDIR \$ENV\{DESTDIR\})
+ if (DESTDIR)
+ message(SEND_ERROR \"GnuCash can't be built with the DESTDIR environment variable set on Windows (due to bad interference with glib-compile-schemas).\")
+ endif()
+ endif()
+ execute_process(
+ COMMAND ${SHELL} -c \"echo Compiling gschema files in \$ENV\{DESTDIR\}${CMAKE_INSTALL_FULL_DATADIR}/glib-2.0/schemas ;
+ ${GLIB_COMPILE_SCHEMAS} \$ENV\{DESTDIR\}${CMAKE_INSTALL_FULL_DATADIR}/glib-2.0/schemas\")")
endif ()
set(gschemas_DIST_local "")
commit f28cf4161183223119f3524a6e0af5e8d1bf453e
Author: Geert Janssens <geert at kobaltwit.be>
Date: Sun Oct 6 20:17:42 2019 +0200
Fix another dependency issue
This one popped up while experimenting on Windows.
In general: whenever a guile module (the ones created with
'define-module' load files (via 'load-from-path')
the loaded files must have been built before the
module. Otherwise targets depending on the module
may have dependency issues.
diff --git a/gnucash/report/CMakeLists.txt b/gnucash/report/CMakeLists.txt
index 4292f3ca3..c7456f691 100644
--- a/gnucash/report/CMakeLists.txt
+++ b/gnucash/report/CMakeLists.txt
@@ -47,11 +47,7 @@ install(FILES ${report_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gnucash)
# Scheme
-set (report_SCHEME
- report.scm
-)
-
-set (report_SCHEME_2
+set (report_SCHEME_1
commodity-utilities.scm
html-acct-table.scm
html-chart.scm
@@ -74,6 +70,10 @@ set (report_SCHEME_2
trep-engine.scm
)
+set (report_SCHEME_2
+ report.scm
+)
+
set (report_eguile_parts_SCHEME
eguile-utilities.scm
eguile-html-utilities.scm
@@ -94,15 +94,15 @@ set(GUILE_DEPENDS
)
gnc_add_scheme_targets(scm-report-1
- "${report_SCHEME}"
- "gnucash"
+ "${report_SCHEME_1}"
+ "gnucash/report"
"${GUILE_DEPENDS}"
FALSE
)
gnc_add_scheme_targets(scm-report-2
"${report_SCHEME_2}"
- "gnucash/report"
+ "gnucash"
scm-report-1
TRUE
)
@@ -110,7 +110,7 @@ gnc_add_scheme_targets(scm-report-2
gnc_add_scheme_targets(scm-report-eguile-parts
"${report_eguile_parts_SCHEME}"
"gnucash/eguile"
- scm-report-1
+ scm-report-2
FALSE
)
@@ -125,7 +125,7 @@ gnc_add_scheme_targets(scm-report-eguile
gnc_add_scheme_deprecated_module ("gnucash report eguile-gnc" "gnucash eguile" "scm-report-eguile" "")
gnc_add_scheme_deprecated_module ("gnucash report eguile-html-utilities" "gnucash eguile" "scm-report-eguile" "")
gnc_add_scheme_deprecated_module ("gnucash report eguile-utilities" "gnucash eguile" "scm-report-eguile" "")
-gnc_add_scheme_deprecated_module ("gnucash report report-system" "gnucash report" "scm-report-1" "")
+gnc_add_scheme_deprecated_module ("gnucash report report-system" "gnucash report" "scm-report-2" "")
gnc_add_scheme_deprecated_module ("gnucash report business-reports" "" "" "")
gnc_add_scheme_deprecated_module ("gnucash report report-system collectors" "" "" "")
Summary of changes:
CMakeLists.txt | 2 ++
gnucash/gschemas/CMakeLists.txt | 18 ++++++++++++++----
gnucash/report/CMakeLists.txt | 20 ++++++++++----------
3 files changed, 26 insertions(+), 14 deletions(-)
More information about the gnucash-changes
mailing list