gnucash maint: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Sat Dec 16 13:54:52 EST 2017
Updated via https://github.com/Gnucash/gnucash/commit/8efc0e7b (commit)
via https://github.com/Gnucash/gnucash/commit/9dcb2037 (commit)
from https://github.com/Gnucash/gnucash/commit/51fab91f (commit)
commit 8efc0e7bdc6c7876e376aa4e8ef7b8b4f3ffa52a
Merge: 51fab91 9dcb203
Author: John Ralls <jralls at ceridwen.us>
Date: Sat Dec 16 10:54:03 2017 -0800
Merge Rob Gowin's Partial Fix for Bug 787497 into maint.
commit 9dcb2037ad8ffe6295e343d7656ca311c80679a5
Author: Rob Gowin <robgowin at gmail.com>
Date: Sat Dec 2 17:59:40 2017 -0600
Partial fix for Bug 787497 - Disabling options cripples dist package
WITH_OFX, WITH_SQL and WITH_AQBANKING handling is fixed. The
dist files for these features are always included in the dist
tarball.
I added code for WITH_GNUCASH=OFF to error out when trying to
create a dist tarball. Not fully tested because WITH_GNUCASH=OFF
itself does not build.
Still need to backport fixes from unstable for WITH_PYTHON=OFF.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f361a9a..c78d500 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -594,6 +594,7 @@ ADD_CUSTOM_COMMAND(OUTPUT ${DIST_FILE}.gz ${DIST_FILE}.bz2
-D BUILDING_FROM_VCS=${BUILDING_FROM_VCS}
-D SHELL=${SHELL}
-D AUTOTOOLS_IN_DIST=${AUTOTOOLS_IN_DIST}
+ -D WITH_GNUCASH=${WITH_GNUCASH}
-P ${CMAKE_SOURCE_DIR}/src/cmake_modules/MakeDist.cmake
DEPENDS
@@ -626,8 +627,17 @@ configure_file(
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-SET_TARGET_PROPERTIES(gnc-qof gnc-core-utils gnc-module gnc-backend-sql gnc-backend-xml-utils
- gnc-business-ledger gnc-gnome PROPERTIES
+SET(_MODULES gnc-qof gnc-core-utils gnc-module gnc-backend-xml-utils)
+
+IF (WITH_SQL)
+ LIST(APPEND _MODULES gnc-backend-sql)
+ENDIF(WITH_SQL)
+
+IF (WITH_GNUCASH)
+ LIST(APPEND _MODULES gnc-business-ledger gnc-gnome)
+ENDIF(WITH_GNUCASH)
+
+SET_TARGET_PROPERTIES(${_MODULES} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
IF (XCODE_VERSION)
LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/lib
diff --git a/src/backend/CMakeLists.txt b/src/backend/CMakeLists.txt
index 35ebf79..48209be 100644
--- a/src/backend/CMakeLists.txt
+++ b/src/backend/CMakeLists.txt
@@ -1,9 +1,7 @@
ADD_SUBDIRECTORY(xml)
-IF (WITH_SQL)
- ADD_SUBDIRECTORY (dbi)
- ADD_SUBDIRECTORY (sql)
-ENDIF (WITH_SQL)
+ADD_SUBDIRECTORY (dbi)
+ADD_SUBDIRECTORY (sql)
diff --git a/src/backend/dbi/CMakeLists.txt b/src/backend/dbi/CMakeLists.txt
index 1ed55eb..4579b43 100644
--- a/src/backend/dbi/CMakeLists.txt
+++ b/src/backend/dbi/CMakeLists.txt
@@ -18,36 +18,39 @@ SET(backend_dbi_DIST ${backend_dbi_DIST_local} ${test_dbi_backend_DIST} PARENT_S
# Add dependency on config.h
SET_SOURCE_FILES_PROPERTIES (${backend_dbi_SOURCES} PROPERTIES OBJECT_DEPENDS ${CONFIG_H})
-ADD_LIBRARY (gncmod-backend-dbi
- ${backend_dbi_SOURCES}
- ${backend_dbi_noinst_HEADERS}
-)
+IF (WITH_SQL)
+ ADD_LIBRARY (gncmod-backend-dbi
+ ${backend_dbi_SOURCES}
+ ${backend_dbi_noinst_HEADERS}
+ )
-TARGET_LINK_LIBRARIES(gncmod-backend-dbi gnc-backend-sql gncmod-engine gnc-qof ${GTK2_LDFLAGS} ${LIBDBI_LIBRARY})
+ TARGET_LINK_LIBRARIES(gncmod-backend-dbi gnc-backend-sql gncmod-engine gnc-qof ${GTK2_LDFLAGS} ${LIBDBI_LIBRARY})
-TARGET_COMPILE_DEFINITIONS(gncmod-backend-dbi PRIVATE -DG_LOG_DOMAIN=\"gnc.backend.dbi\")
+ TARGET_COMPILE_DEFINITIONS(gncmod-backend-dbi PRIVATE -DG_LOG_DOMAIN=\"gnc.backend.dbi\")
-TARGET_INCLUDE_DIRECTORIES(gncmod-backend-dbi PRIVATE ${LIBDBI_INCLUDE_PATH})
+ TARGET_INCLUDE_DIRECTORIES(gncmod-backend-dbi PRIVATE ${LIBDBI_INCLUDE_PATH})
-INSTALL(TARGETS gncmod-backend-dbi
- LIBRARY DESTINATION lib/gnucash
- ARCHIVE DESTINATION lib/gnucash
- RUNTIME DESTINATION bin)
-# No headers to install
+ INSTALL(TARGETS gncmod-backend-dbi
+ LIBRARY DESTINATION lib/gnucash
+ ARCHIVE DESTINATION lib/gnucash
+ RUNTIME DESTINATION bin)
-# FIXME: Below is a hack to create .libs/libgncmod-backend-dbi to silence some complaints
-# from guile when compiling. Eventually, fix the guile module loader to not expect items
-# to be in .libs. At this time, WIN32 does not use guile-2, so no need for this.
+ # No headers to install
-IF (NOT WIN32)
- SET(_LINK_TARGET ${CMAKE_CURRENT_BINARY_DIR}/.libs/libgncmod-backend-dbi${CMAKE_SHARED_LIBRARY_SUFFIX})
- FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/.libs)
+ # FIXME: Below is a hack to create .libs/libgncmod-backend-dbi to silence some complaints
+ # from guile when compiling. Eventually, fix the guile module loader to not expect items
+ # to be in .libs. At this time, WIN32 does not use guile-2, so no need for this.
- ADD_CUSTOM_COMMAND(
- OUTPUT ${_LINK_TARGET}
- COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE:gncmod-backend-dbi> ${_LINK_TARGET}
- DEPENDS gnc-backend-dbi
- )
+ IF (NOT WIN32)
+ SET(_LINK_TARGET ${CMAKE_CURRENT_BINARY_DIR}/.libs/libgncmod-backend-dbi${CMAKE_SHARED_LIBRARY_SUFFIX})
+ FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/.libs)
+
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${_LINK_TARGET}
+ COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE:gncmod-backend-dbi> ${_LINK_TARGET}
+ DEPENDS gnc-backend-dbi
+ )
- ADD_CUSTOM_TARGET(gncmod-backend-dbi-link ALL DEPENDS gncmod-backend-dbi ${_LINK_TARGET})
-ENDIF()
+ ADD_CUSTOM_TARGET(gncmod-backend-dbi-link ALL DEPENDS gncmod-backend-dbi ${_LINK_TARGET})
+ ENDIF()
+ENDIF(WITH_SQL)
\ No newline at end of file
diff --git a/src/backend/dbi/test/CMakeLists.txt b/src/backend/dbi/test/CMakeLists.txt
index 6b16769..9552f6e 100644
--- a/src/backend/dbi/test/CMakeLists.txt
+++ b/src/backend/dbi/test/CMakeLists.txt
@@ -25,7 +25,7 @@ SET(test_dbi_backend_HEADERS test-dbi-business-stuff.h test-dbi-stuff.h)
SET_DIST_LIST(test_dbi_backend_DIST ${test_dbi_backend_SOURCES} ${test_dbi_backend_HEADERS} test-dbi.xml CMakeLists.txt Makefile.am)
# This test does not work on Win32
-IF (NOT WIN32)
+IF (WITH_SQL AND NOT WIN32)
GNC_ADD_TEST(test-backend-dbi "${test_dbi_backend_SOURCES}"
BACKEND_DBI_TEST_INCLUDE_DIRS BACKEND_DBI_TEST_LIBS
)
diff --git a/src/backend/sql/CMakeLists.txt b/src/backend/sql/CMakeLists.txt
index 53a8bea..44ed1d9 100644
--- a/src/backend/sql/CMakeLists.txt
+++ b/src/backend/sql/CMakeLists.txt
@@ -59,20 +59,23 @@ SET(backend_sql_DIST ${backend_sql_DIST_local} ${test_backend_sql_DIST} PARENT_S
# Add dependency on config.h
SET_SOURCE_FILES_PROPERTIES (${gnc_backend_sql_SOURCES} PROPERTIES OBJECT_DEPENDS ${CONFIG_H})
-ADD_LIBRARY (gnc-backend-sql
- ${backend_sql_SOURCES}
- ${backend_sql_noinst_HEADERS}
-)
+IF (WITH_SQL)
+
+ ADD_LIBRARY (gnc-backend-sql
+ ${backend_sql_SOURCES}
+ ${backend_sql_noinst_HEADERS}
+ )
-TARGET_LINK_LIBRARIES(gnc-backend-sql gncmod-engine gnc-qof)
+ TARGET_LINK_LIBRARIES(gnc-backend-sql gncmod-engine gnc-qof)
-TARGET_COMPILE_DEFINITIONS (gnc-backend-sql PRIVATE -DG_LOG_DOMAIN=\"gnc.backend.sql\")
+ TARGET_COMPILE_DEFINITIONS (gnc-backend-sql PRIVATE -DG_LOG_DOMAIN=\"gnc.backend.sql\")
-TARGET_INCLUDE_DIRECTORIES(gnc-backend-sql PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
+ TARGET_INCLUDE_DIRECTORIES(gnc-backend-sql PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
-INSTALL(TARGETS gnc-backend-sql
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib
- RUNTIME DESTINATION bin)
+ INSTALL(TARGETS gnc-backend-sql
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin)
+ENDIF(WITH_SQL)
# No headers to install
diff --git a/src/backend/sql/test/CMakeLists.txt b/src/backend/sql/test/CMakeLists.txt
index a9cc357..102a49e 100644
--- a/src/backend/sql/test/CMakeLists.txt
+++ b/src/backend/sql/test/CMakeLists.txt
@@ -15,14 +15,14 @@ SET(BACKEND_SQL_TEST_LIBS gnc-backend-sql gncmod-engine gnc-qof test-core)
SET_DIST_LIST(test_backend_sql_DIST ${test_backend_sql_SOURCES} CMakeLists.txt Makefile.am
test-column-types.c)
-# This test does not actually do anything.
-GNC_ADD_TEST(test-column-types test-column-types.c
- BACKEND_SQL_TEST_INCLUDE_DIRS BACKEND_SQL_TEST_LIBS
-)
-
-
-
-GNC_ADD_TEST(test-sqlbe "${test_backend_sql_SOURCES}"
- BACKEND_SQL_TEST_INCLUDE_DIRS BACKEND_SQL_TEST_LIBS
-)
-TARGET_COMPILE_DEFINITIONS(test-sqlbe PRIVATE TESTPROG=test_sqlbe)
\ No newline at end of file
+IF (WITH_SQL)
+ # This test does not actually do anything.
+ GNC_ADD_TEST(test-column-types test-column-types.c
+ BACKEND_SQL_TEST_INCLUDE_DIRS BACKEND_SQL_TEST_LIBS
+ )
+
+ GNC_ADD_TEST(test-sqlbe "${test_backend_sql_SOURCES}"
+ BACKEND_SQL_TEST_INCLUDE_DIRS BACKEND_SQL_TEST_LIBS
+ )
+ TARGET_COMPILE_DEFINITIONS(test-sqlbe PRIVATE TESTPROG=test_sqlbe)
+ENDIF(WITH_SQL)
\ No newline at end of file
diff --git a/src/cmake_modules/MakeDist.cmake b/src/cmake_modules/MakeDist.cmake
index a0fdf15..0150ae2 100644
--- a/src/cmake_modules/MakeDist.cmake
+++ b/src/cmake_modules/MakeDist.cmake
@@ -181,4 +181,8 @@ FUNCTION(MAKE_DIST PACKAGE_PREFIX GNUCASH_SOURCE_DIR BUILD_SOURCE_DIR BUILDING_F
MESSAGE("\n\nDistributions ${PACKAGE_PREFIX}.tar.gz and ${PACKAGE_PREFIX}.tar.bz2 created.\n\n")
ENDFUNCTION()
+IF (NOT WITH_GNUCASH)
+ MESSAGE(SEND_ERROR "Creation of dist tarballs not support when WITH_GNUCASH=OFF.")
+ENDIF()
+
MAKE_DIST(${PACKAGE_PREFIX} ${GNUCASH_SOURCE_DIR} ${BUILD_SOURCE_DIR} ${BUILDING_FROM_VCS})
diff --git a/src/import-export/CMakeLists.txt b/src/import-export/CMakeLists.txt
index 7991a92..7bb6ba4 100644
--- a/src/import-export/CMakeLists.txt
+++ b/src/import-export/CMakeLists.txt
@@ -3,16 +3,12 @@
ADD_SUBDIRECTORY(test)
# ############################################################
-if (WITH_AQBANKING)
- ADD_SUBDIRECTORY(aqb)
-endif()
+ADD_SUBDIRECTORY(aqb)
ADD_SUBDIRECTORY(csv-exp)
ADD_SUBDIRECTORY(csv-imp)
ADD_SUBDIRECTORY(gschemas)
ADD_SUBDIRECTORY(log-replay)
-if (WITH_OFX)
- ADD_SUBDIRECTORY(ofx)
-endif()
+ADD_SUBDIRECTORY(ofx)
ADD_SUBDIRECTORY(qif)
ADD_SUBDIRECTORY(qif-imp)
diff --git a/src/import-export/ofx/gschemas/CMakeLists.txt b/src/import-export/ofx/gschemas/CMakeLists.txt
index 83a44a7..c48c5b6 100644
--- a/src/import-export/ofx/gschemas/CMakeLists.txt
+++ b/src/import-export/ofx/gschemas/CMakeLists.txt
@@ -1,6 +1,8 @@
-set(ofx_GSCHEMA org.gnucash.dialogs.import.ofx.gschema.xml)
+IF (WITH_OFX)
+ set(ofx_GSCHEMA org.gnucash.dialogs.import.ofx.gschema.xml)
-ADD_GSCHEMA_TARGETS(ofx-gschema "${ofx_GSCHEMA}")
+ ADD_GSCHEMA_TARGETS(ofx-gschema "${ofx_GSCHEMA}")
+ENDIF (WITH_OFX)
SET_DIST_LIST(ofx_gschema_DIST CMakeLists.txt Makefile.am org.gnucash.dialogs.import.ofx.gschema.xml.in.in)
\ No newline at end of file
diff --git a/src/import-export/ofx/test/CMakeLists.txt b/src/import-export/ofx/test/CMakeLists.txt
index 7fec110..911d91c 100644
--- a/src/import-export/ofx/test/CMakeLists.txt
+++ b/src/import-export/ofx/test/CMakeLists.txt
@@ -1,10 +1,10 @@
-SET(OFX_TEST_INCLUDE_DIRS
- ${LIBOFX_INCLUDE_DIRS}
-)
-SET(OFX_TEST_LIBS)
+IF(WITH_OFX)
+ SET(OFX_TEST_INCLUDE_DIRS ${LIBOFX_INCLUDE_DIRS})
+ SET(OFX_TEST_LIBS)
-GNC_ADD_TEST(test-link-ofx test-link.c OFX_TEST_INCLUDE_DIRS OFX_TEST_LIBS)
+ GNC_ADD_TEST(test-link-ofx test-link.c OFX_TEST_INCLUDE_DIRS OFX_TEST_LIBS)
+ENDIF(WITH_OFX)
SET_DIST_LIST(test_ofx_DIST CMakeLists.txt Makefile.am test-link.c)
\ No newline at end of file
Summary of changes:
CMakeLists.txt | 14 ++++++-
src/backend/CMakeLists.txt | 6 +--
src/backend/dbi/CMakeLists.txt | 53 ++++++++++++++-------------
src/backend/dbi/test/CMakeLists.txt | 2 +-
src/backend/sql/CMakeLists.txt | 25 +++++++------
src/backend/sql/test/CMakeLists.txt | 22 +++++------
src/cmake_modules/MakeDist.cmake | 4 ++
src/import-export/CMakeLists.txt | 8 +---
src/import-export/ofx/gschemas/CMakeLists.txt | 6 ++-
src/import-export/ofx/test/CMakeLists.txt | 10 ++---
10 files changed, 83 insertions(+), 67 deletions(-)
More information about the gnucash-changes
mailing list