gnucash master: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Tue Feb 21 19:01:32 EST 2023
Updated via https://github.com/Gnucash/gnucash/commit/4666a426 (commit)
via https://github.com/Gnucash/gnucash/commit/6470319c (commit)
via https://github.com/Gnucash/gnucash/commit/bddb4468 (commit)
via https://github.com/Gnucash/gnucash/commit/17648ac9 (commit)
via https://github.com/Gnucash/gnucash/commit/27fe7249 (commit)
via https://github.com/Gnucash/gnucash/commit/c2a1cd10 (commit)
from https://github.com/Gnucash/gnucash/commit/03871c55 (commit)
commit 4666a426ede96506e8392a59a62aea45b4df5c59
Merge: 03871c55c 6470319c8
Author: John Ralls <jralls at ceridwen.us>
Date: Tue Feb 21 15:39:01 2023 -0800
Merge Richard Cohen's 'warn-deprecated-gtk-glib' into master.
commit 6470319c88e540c556c13ad33840c9ffac6535a8
Author: Richard Cohen <richard at daijobu.co.uk>
Date: Tue Jan 31 15:02:25 2023 +0000
Warn about deprecated gtk, glib
- G_DISABLE_DEPRECATED no longer exists (as of glib 2.61.2)
- Turn off aqbanking global deprecation
Spoilers:
- gtk
- (3.22) gdk_screen_width
- (3.22) gdk_screen_height
- glib
- (2.68) g_binding_get_target -> g_binding_dup_target
- aqbanking
- AB_Banking_LoadSharedConfig
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b2ae4dfaa..0598560cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,8 +52,8 @@ option (WITH_OFX "compile with ofx support (needs LibOFX)" ON)
option (WITH_PYTHON "enable python plugin and bindings" OFF)
option (ENABLE_BINRELOC "compile with binary relocation support" ON)
option (DISABLE_NLS "do not use Native Language Support" OFF)
-option (DISABLE_DEPRECATED_GLIB "don't use deprecated glib functions" OFF)
-option (DISABLE_DEPRECATED_GTK "don't use deprecated gtk, gdk or gdk-pixbuf functions" OFF)
+option (WARN_DEPRECATED_GLIB "warn about deprecated glib functions" OFF)
+option (WARN_DEPRECATED_GTK "warn about deprecated gtk, gdk or gdk-pixbuf functions" OFF)
# ############################################################
# These are also settable from the command line in a similar way.
@@ -196,7 +196,10 @@ if (NOT PKG_CONFIG_FOUND)
endif()
# glib et al.
-pkg_check_modules (GLIB2 REQUIRED IMPORTED_TARGET glib-2.0>=2.56.1)
+set(GLIB_MIN_VERSION 2.56.1)
+set(GTK_MIN_VERSION 3.22.30)
+
+pkg_check_modules (GLIB2 REQUIRED IMPORTED_TARGET glib-2.0>=${GLIB_MIN_VERSION})
pkg_check_modules (GIO REQUIRED gio-2.0)
pkg_check_modules (GOBJECT REQUIRED gobject-2.0)
pkg_check_modules (GMODULE REQUIRED gmodule-2.0)
@@ -216,7 +219,7 @@ if (WITH_GNUCASH)
set(WEBKIT2 1 CACHE INTERNAL "WebKit2Gtk4")
endif()
- pkg_check_modules (GTK3 REQUIRED IMPORTED_TARGET gtk+-3.0>=3.22.30)
+ pkg_check_modules (GTK3 REQUIRED IMPORTED_TARGET gtk+-3.0>=${GTK_MIN_VERSION})
endif()
pkg_check_modules (ZLIB REQUIRED zlib)
@@ -772,15 +775,28 @@ set(PLATFORM_OSX 1)
set(HAVE_OSX_KEYCHAIN 1)
endif()
+if(WARN_DEPRECATED_GLIB)
+ string(REGEX MATCH "^([0-9]+)\.([0-9]+)" GLIB_MIN_MATCH ${GLIB_MIN_VERSION})
+ set(GLIB_API ${CMAKE_MATCH_1}_${CMAKE_MATCH_2})
-if(DISABLE_DEPRECATED_GTK)
-set(GTK_DISABLE_DEPRECATED 1)
-set(GDK_DISABLE_DEPRECATED 1)
-set(GDK_PIXMAP_DISABLE_DEPRECATED 1)
+ target_compile_definitions(PkgConfig::GLIB2 INTERFACE
+ GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_${GLIB_API}
+ GLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_${GLIB_API})
+else()
+ target_compile_definitions(PkgConfig::GLIB2 INTERFACE
+ GLIB_DISABLE_DEPRECATION_WARNINGS)
endif()
-if(DISABLE_DEPRECATED_GLIB)
-set(G_DISABLE_DEPRECATED 1)
+if (WARN_DEPRECATED_GTK)
+ string(REGEX MATCH "^([0-9]+)\.([0-9]+)" GTK_MIN_MATCH ${GTK_MIN_VERSION})
+ set(GTK_API ${CMAKE_MATCH_1}_${CMAKE_MATCH_2})
+
+ target_compile_definitions(PkgConfig::GTK3 INTERFACE
+ GDK_VERSION_MIN_REQUIRED=GDK_VERSION_${GTK_API}
+ GDK_VERSION_MAX_ALLOWED=GDK_VERSION_${GTK_API})
+else()
+ target_compile_definitions(PkgConfig::GTK3 INTERFACE
+ GDK_DISABLE_DEPRECATION_WARNINGS)
endif()
add_definitions (-DHAVE_CONFIG_H)
diff --git a/common/config.h.cmake.in b/common/config.h.cmake.in
index 722fb6345..f00b3309d 100644
--- a/common/config.h.cmake.in
+++ b/common/config.h.cmake.in
@@ -15,12 +15,6 @@
/* always defined to indicate that i18n is enabled */
#cmakedefine ENABLE_NLS 1
-/* Don't use deprecated gdk functions */
-#cmakedefine GDK_DISABLE_DEPRECATED 1
-
-/* Don't use deprecated gdk-pixbuf functions */
-#cmakedefine GDK_PIXBUF_DISABLE_DEPRECATED 1
-
/* Using GDK Quartz (not X11) */
#cmakedefine GDK_QUARTZ
@@ -54,12 +48,6 @@
/* GnuCash prefix to use for GLib resources */
#define GNUCASH_RESOURCE_PREFIX "@GNUCASH_RESOURCE_PREFIX@"
-/* Don't use deprecated gtk functions */
-#cmakedefine GTK_DISABLE_DEPRECATED 1
-
-/* Don't use deprecated glib functions */
-#cmakedefine G_DISABLE_DEPRECATED 1
-
/* define if the Boost library is available */
#cmakedefine HAVE_BOOST
diff --git a/gnucash/gnome-utils/CMakeLists.txt b/gnucash/gnome-utils/CMakeLists.txt
index 82c0c9aeb..014431974 100644
--- a/gnucash/gnome-utils/CMakeLists.txt
+++ b/gnucash/gnome-utils/CMakeLists.txt
@@ -220,7 +220,6 @@ target_link_libraries(gnc-gnome-utils
${LIBSECRET_LDFLAGS}
${GTK_MAC_LDFLAGS})
-target_compile_options(gnc-gnome-utils PRIVATE -Wno-deprecated-declarations)
target_compile_definitions(gnc-gnome-utils PUBLIC ${GTK_MAC_CFLAGS_OTHER}
PRIVATE -DG_LOG_DOMAIN=\"gnc.gui\")
diff --git a/gnucash/gnome/CMakeLists.txt b/gnucash/gnome/CMakeLists.txt
index 4a88bb2db..867743ea5 100644
--- a/gnucash/gnome/CMakeLists.txt
+++ b/gnucash/gnome/CMakeLists.txt
@@ -146,7 +146,6 @@ target_link_libraries(gnc-gnome
${GTK_MAC_LDFLAGS})
target_compile_definitions (gnc-gnome PRIVATE -DG_LOG_DOMAIN=\"gnc.gui\" ${GTK_MAC_CFLAGS_OTHER})
-target_compile_options(gnc-gnome PRIVATE -Wno-deprecated-declarations)
target_include_directories(gnc-gnome
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
diff --git a/gnucash/import-export/aqb/CMakeLists.txt b/gnucash/import-export/aqb/CMakeLists.txt
index 4a8da6849..486bc87ca 100644
--- a/gnucash/import-export/aqb/CMakeLists.txt
+++ b/gnucash/import-export/aqb/CMakeLists.txt
@@ -69,8 +69,8 @@ if(WITH_AQBANKING)
${GWENHYWFAR_LDFLAGS} ${GWEN_GTK3_LDFLAGS}
${AQB_LIBSTDCXX})
- target_compile_definitions(gncmod-aqbanking PRIVATE -DG_LOG_DOMAIN=\"gnc.import.aqbanking\")
- target_compile_options(gncmod-aqbanking PRIVATE -Wno-deprecated-declarations)
+ target_compile_definitions(gncmod-aqbanking PRIVATE G_LOG_DOMAIN=\"gnc.import.aqbanking\")
+ target_compile_definitions(gncmod-aqbanking PRIVATE AQBANKING_NOWARN_DEPRECATED)
target_include_directories(gncmod-aqbanking PRIVATE
${AQBANKING_INCLUDE_DIRS}
commit bddb4468fa00c2a2cacd57934363f3693e70f1d8
Author: Richard Cohen <richard at daijobu.co.uk>
Date: Tue Feb 21 11:22:55 2023 +0000
Import GLIB2 as a target, and use it to simplify the CMakeLists
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 03be45e3b..b2ae4dfaa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -196,7 +196,7 @@ if (NOT PKG_CONFIG_FOUND)
endif()
# glib et al.
-pkg_check_modules (GLIB2 REQUIRED glib-2.0>=2.56.1)
+pkg_check_modules (GLIB2 REQUIRED IMPORTED_TARGET glib-2.0>=2.56.1)
pkg_check_modules (GIO REQUIRED gio-2.0)
pkg_check_modules (GOBJECT REQUIRED gobject-2.0)
pkg_check_modules (GMODULE REQUIRED gmodule-2.0)
diff --git a/bindings/guile/CMakeLists.txt b/bindings/guile/CMakeLists.txt
index 1653b3b1c..f95f78b02 100644
--- a/bindings/guile/CMakeLists.txt
+++ b/bindings/guile/CMakeLists.txt
@@ -69,7 +69,6 @@ target_include_directories(gnucash-guile
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${GUILE_INCLUDE_DIRS}
- ${GLIB2_INCLUDE_DIRS}
PRIVATE
${CMAKE_SOURCE_DIR}/common
${CMAKE_BINARY_DIR}/common)
@@ -81,7 +80,7 @@ target_link_libraries(gnucash-guile
gnc-core-utils
gnc-engine
gnc-app-utils
- ${GLIB2_LDFLAGS})
+ PkgConfig::GLIB2)
install(TARGETS gnucash-guile
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
@@ -95,15 +94,14 @@ add_library(gnc-expressions-guile SHARED
target_include_directories(gnc-expressions-guile
PUBLIC
${CMAKE_SOURCE_DIR}/libgnucash/expressions
- ${GUILE_INCLUDE_DIRS}
- ${GLIB2_INCLUDE_DIRS})
+ ${GUILE_INCLUDE_DIRS})
target_link_libraries(gnc-expressions-guile
gnc-expressions
gnc-engine
gnc-app-utils
${GUILE_LDFLAGS}
- ${GLIB2_LDFLAGS})
+ PkgConfig::GLIB2)
install(TARGETS gnc-expressions-guile
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
diff --git a/bindings/guile/test/CMakeLists.txt b/bindings/guile/test/CMakeLists.txt
index d91e59ae0..d0a8fbb0d 100644
--- a/bindings/guile/test/CMakeLists.txt
+++ b/bindings/guile/test/CMakeLists.txt
@@ -8,7 +8,6 @@ set(ENGINE_TEST_INCLUDE_DIRS
${CMAKE_SOURCE_DIR}/common/test-core # for unittest-support.h
${CMAKE_SOURCE_DIR}/libgnucash/app-utils
${CMAKE_SOURCE_DIR}/bindings/guile # for gnc-engine-guile.h
- ${GLIB2_INCLUDE_DIRS}
${GUILE_INCLUDE_DIRS}
)
diff --git a/common/test-core/CMakeLists.txt b/common/test-core/CMakeLists.txt
index 2e8501ea6..7aabb95ea 100644
--- a/common/test-core/CMakeLists.txt
+++ b/common/test-core/CMakeLists.txt
@@ -14,7 +14,6 @@ include_directories(
${CMAKE_SOURCE_DIR}/libgnucash/engine
${CMAKE_SOURCE_DIR}/common/test-core
- ${GLIB2_INCLUDE_DIRS}
${GUILE_INCLUDE_DIRS}
)
@@ -22,7 +21,7 @@ set_dist_list(test_core_DIST ${test_core_SOURCES} ${test_core_noinst_HEADERS} CM
unittest-support.i unittest-support.scm)
add_library(test-core STATIC ${test_core_SOURCES} ${test_core_noinst_HEADERS})
-target_link_libraries(test-core gnc-engine ${GLIB2_LDFLAGS})
+target_link_libraries(test-core gnc-engine PkgConfig::GLIB2)
if (UNIX)
target_compile_options(test-core PRIVATE -fPIC)
endif()
@@ -41,7 +40,7 @@ gnc_add_swig_python_command (swig-unittest-support-python
)
add_library(test-core-guile ${SWIG_UNITTEST_SUPPORT_GUILE_C})
-target_link_libraries(test-core-guile test-core ${GUILE_LDFLAGS} ${GLIB2_LDFLAGS})
+target_link_libraries(test-core-guile test-core ${GUILE_LDFLAGS} PkgConfig::GLIB2)
add_dependencies (test-core-guile swig-unittest-support-guile-c )
if (WITH_PYTHON)
diff --git a/gnucash/CMakeLists.txt b/gnucash/CMakeLists.txt
index ab38a52fa..95ff42cd8 100644
--- a/gnucash/CMakeLists.txt
+++ b/gnucash/CMakeLists.txt
@@ -109,7 +109,7 @@ target_link_libraries (gnucash
gnc-engine gnc-module gnc-core-utils gnucash-guile
gnc-qif-import gnc-csv-import gnc-csv-export gnc-log-replay
gnc-bi-import gnc-customer-import gnc-report
- PkgConfig::GTK3 ${GUILE_LDFLAGS} ${GLIB2_LDFLAGS}
+ PkgConfig::GTK3 ${GUILE_LDFLAGS} PkgConfig::GLIB2
${Boost_LIBRARIES}
)
@@ -142,7 +142,7 @@ target_compile_definitions(gnucash-cli PRIVATE -DG_LOG_DOMAIN=\"gnc.bin\")
target_link_libraries (gnucash-cli
gnc-gnome-utils gnc-app-utils
gnc-engine gnc-core-utils gnucash-guile gnc-report
- ${GUILE_LDFLAGS} ${GLIB2_LDFLAGS}
+ ${GUILE_LDFLAGS} PkgConfig::GLIB2
${Boost_LIBRARIES}
)
diff --git a/gnucash/gnome-utils/test/CMakeLists.txt b/gnucash/gnome-utils/test/CMakeLists.txt
index 207830aa6..1bdc265a8 100644
--- a/gnucash/gnome-utils/test/CMakeLists.txt
+++ b/gnucash/gnome-utils/test/CMakeLists.txt
@@ -3,7 +3,6 @@ set(GNOME_UTILS_GUI_TEST_INCLUDE_DIRS
${CMAKE_BINARY_DIR}/common
${CMAKE_SOURCE_DIR}/gnucash/gnome-utils
${CMAKE_SOURCE_DIR}/libgnucash/engine
- ${GLIB2_INCLUDE_DIRS}
${GUILE_INCLUDE_DIRS}
)
set(GNOME_UTILS_GUI_TEST_LIBS
@@ -36,7 +35,6 @@ set(test_autoclear_SOURCES
set(test_autoclear_INCLUDE_DIRS
${CMAKE_BINARY_DIR}/common
${CMAKE_SOURCE_DIR}/libgnucash/engine
- ${GLIB2_INCLUDE_DIRS}
)
set(test_autoclear_LIBS
diff --git a/gnucash/import-export/CMakeLists.txt b/gnucash/import-export/CMakeLists.txt
index 11591f3d9..c4e038b95 100644
--- a/gnucash/import-export/CMakeLists.txt
+++ b/gnucash/import-export/CMakeLists.txt
@@ -50,7 +50,7 @@ add_library (gnc-generic-import
${generic_import_noinst_HEADERS}
)
-target_link_libraries(gnc-generic-import gnc-gnome-utils gnc-engine PkgConfig::GTK3 ${GLIB2_LDFLAGS})
+target_link_libraries(gnc-generic-import gnc-gnome-utils gnc-engine PkgConfig::GTK3 PkgConfig::GLIB2)
target_compile_definitions (gnc-generic-import PRIVATE -DG_LOG_DOMAIN=\"gnc.import\")
diff --git a/gnucash/import-export/aqb/test/CMakeLists.txt b/gnucash/import-export/aqb/test/CMakeLists.txt
index abee7aa86..2d12ddb29 100644
--- a/gnucash/import-export/aqb/test/CMakeLists.txt
+++ b/gnucash/import-export/aqb/test/CMakeLists.txt
@@ -14,7 +14,6 @@ set(test_aqb_INCLUDE_DIRS
${CMAKE_SOURCE_DIR}/libgnucash/engine
${CMAKE_SOURCE_DIR}/libgnucash/core-utils
${CMAKE_SOURCE_DIR}/libgnucash/gnc-module
- ${GLIB2_INCLUDE_DIRS}
${AQBANKING_INCLUDE_DIRS}
)
@@ -22,7 +21,6 @@ set(test_aqb_LIBS
gncmod-aqbanking gnc-generic-import gnc-gnome gnc-gnome-utils
gnc-ledger-core gnc-app-utils
gncmod-backend-xml-utils gnc-engine gnc-core-utils gnc-module
- ${GLIB2_LDFLAGS}
)
set_dist_list(test_aqb_DIST ${test_aqb_SOURCES} file-book.gnucash
diff --git a/gnucash/import-export/csv-imp/test/CMakeLists.txt b/gnucash/import-export/csv-imp/test/CMakeLists.txt
index 953f64d6d..d2afce6a6 100644
--- a/gnucash/import-export/csv-imp/test/CMakeLists.txt
+++ b/gnucash/import-export/csv-imp/test/CMakeLists.txt
@@ -4,14 +4,13 @@ set(CSV_IMP_TEST_INCLUDE_DIRS
${CMAKE_SOURCE_DIR}/common
${CMAKE_SOURCE_DIR}/libgnucash/engine
${CMAKE_SOURCE_DIR}/common/test-core
- ${GLIB2_INCLUDE_DIRS}
)
set(CSV_IMP_TEST_LIBS gnc-csv-import gnc-engine test-core)
# This test does not run in Win32
if (NOT WIN32)
set(MODULEPATH ${CMAKE_SOURCE_DIR}/gnucash/import-export/csv-imp)
- set(gtest_csv_imp_LIBS gnc-csv-import ${GLIB2_LDFLAGS} gtest)
+ set(gtest_csv_imp_LIBS gnc-csv-import PkgConfig::GLIB2 gtest)
set(gtest_csv_imp_INCLUDES
${MODULEPATH}
${CSV_IMP_TEST_INCLUDE_DIRS})
diff --git a/gnucash/import-export/customer-import/CMakeLists.txt b/gnucash/import-export/customer-import/CMakeLists.txt
index cdc3ec2e7..126f5b6dd 100644
--- a/gnucash/import-export/customer-import/CMakeLists.txt
+++ b/gnucash/import-export/customer-import/CMakeLists.txt
@@ -22,7 +22,7 @@ target_link_libraries(gnc-customer-import
gnc-app-utils
gnc-engine
gnc-core-utils
- ${GLIB2_LDFLAGS})
+ PkgConfig::GLIB2)
target_include_directories(gnc-customer-import
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
diff --git a/gnucash/import-export/test/CMakeLists.txt b/gnucash/import-export/test/CMakeLists.txt
index a311e61e9..1f29f7c8f 100644
--- a/gnucash/import-export/test/CMakeLists.txt
+++ b/gnucash/import-export/test/CMakeLists.txt
@@ -6,7 +6,6 @@ set(GENERIC_IMPORT_TEST_INCLUDE_DIRS
${CMAKE_SOURCE_DIR}/common/test-core
${CMAKE_SOURCE_DIR}/libgnucash/engine
${CMAKE_SOURCE_DIR}/libgnucash/engine/test-core
- ${GLIB2_INCLUDE_DIRS}
${GUILE_INCLUDE_DIRS}
)
@@ -25,7 +24,6 @@ set(IMPORT_ACCOUNT_MATCHER_TEST_INCLUDE_DIRS
${CMAKE_SOURCE_DIR}/libgnucash/engine
${CMAKE_SOURCE_DIR}/libgnucash/app-utils
${CMAKE_SOURCE_DIR}/gnucash/gnome-utils
- ${GLIB2_INCLUDE_DIRS}
${GTEST_INCLUDE_DIR}
)
diff --git a/gnucash/register/ledger-core/test/CMakeLists.txt b/gnucash/register/ledger-core/test/CMakeLists.txt
index 5a7a5fdd8..f436fcbfc 100644
--- a/gnucash/register/ledger-core/test/CMakeLists.txt
+++ b/gnucash/register/ledger-core/test/CMakeLists.txt
@@ -9,7 +9,6 @@ set(SPLIT_REG_TEST_INCLUDE_DIRS
${CMAKE_SOURCE_DIR}/gnucash/register/ledger-core
${CMAKE_BINARY_DIR}/common # for config.h
${CMAKE_SOURCE_DIR}/common/test-core # for unittest-support.h
- ${GLIB2_INCLUDE_DIRS}
)
set(SPLIT_REG_TEST_LIBS
diff --git a/libgnucash/app-utils/CMakeLists.txt b/libgnucash/app-utils/CMakeLists.txt
index c635715ef..08d0cf03a 100644
--- a/libgnucash/app-utils/CMakeLists.txt
+++ b/libgnucash/app-utils/CMakeLists.txt
@@ -76,7 +76,6 @@ target_link_libraries(gnc-app-utils ${app_utils_ALL_LIBRARIES})
target_include_directories (gnc-app-utils
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
- ${GLIB2_INCLUDE_DIRS}
PRIVATE
${app_utils_ALL_INCLUDES}
)
@@ -127,7 +126,6 @@ target_include_directories(gnc-expressions
${CMAKE_SOURCE_DIR}/bindings/guile
${CMAKE_SOURCE_DIR}/libgnucash/app-utils
${GUILE_INCLUDE_DIRS}
- ${GLIB2_INCLUDE_DIRS}
PRIVATE
${CMAKE_SOURCE_DIR}/common
${CMAKE_BINARY_DIR}/common)
@@ -138,7 +136,7 @@ target_link_libraries(gnc-expressions
gnc-app-utils
gnucash-guile
${GUILE_LDFLAGS}
- ${GLIB2_LDFLAGS})
+ PkgConfig::GLIB2)
install(TARGETS gnc-expressions
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
diff --git a/libgnucash/backend/dbi/test/CMakeLists.txt b/libgnucash/backend/dbi/test/CMakeLists.txt
index 787f217c9..09ebf36c1 100644
--- a/libgnucash/backend/dbi/test/CMakeLists.txt
+++ b/libgnucash/backend/dbi/test/CMakeLists.txt
@@ -8,7 +8,6 @@ set(BACKEND_DBI_TEST_INCLUDE_DIRS
${CMAKE_SOURCE_DIR}/libgnucash/engine/test-core
${CMAKE_SOURCE_DIR}/common/test-core
${LIBDBI_INCLUDE_PATH}
- ${GLIB2_INCLUDE_DIRS}
)
set(BACKEND_DBI_TEST_LIBS gnc-backend-sql gnc-engine gnc-test-engine test-core ${Boost_REGEX_LIBRARY} ${LIBDBI_LIBRARY})
diff --git a/libgnucash/backend/sql/test/CMakeLists.txt b/libgnucash/backend/sql/test/CMakeLists.txt
index 4b0bb1ba6..83f276b78 100644
--- a/libgnucash/backend/sql/test/CMakeLists.txt
+++ b/libgnucash/backend/sql/test/CMakeLists.txt
@@ -4,7 +4,6 @@ set(BACKEND_SQL_TEST_INCLUDE_DIRS
${CMAKE_SOURCE_DIR}/libgnucash/backend/sql
${CMAKE_SOURCE_DIR}/libgnucash/engine
${CMAKE_SOURCE_DIR}/common/test-core
- ${GLIB2_INCLUDE_DIRS}
)
set(test_backend_sql_SOURCES test-sqlbe.cpp utest-gnc-backend-sql.cpp)
diff --git a/libgnucash/backend/xml/CMakeLists.txt b/libgnucash/backend/xml/CMakeLists.txt
index a61f20f4a..7da658f1b 100644
--- a/libgnucash/backend/xml/CMakeLists.txt
+++ b/libgnucash/backend/xml/CMakeLists.txt
@@ -105,7 +105,7 @@ set_source_files_properties (${libgncmod_backend_xml_SOURCES} PROPERTIES OBJECT_
add_library(gncmod-backend-xml MODULE ${libgncmod_backend_xml_SOURCES})
target_link_libraries(gncmod-backend-xml gnc-backend-xml-utils gnc-engine
- gnc-core-utils ${LIBXML2_LDFLAGS} ${GLIB2_LDFLAGS} ${ZLIB_LIBRARY})
+ gnc-core-utils ${LIBXML2_LDFLAGS} PkgConfig::GLIB2 ${ZLIB_LIBRARY})
target_compile_definitions (gncmod-backend-xml PRIVATE -DG_LOG_DOMAIN=\"gnc.backend.xml\" -DU_SHOW_CPLUSPLUS_API=0)
@@ -129,5 +129,5 @@ install(TARGETS gncmod-backend-xml
# Special normal (non-MODULE) library for cutecash only
add_library(gncmod-backend-xml-utils ${libgncmod_backend_xml_SOURCES})
target_link_libraries(gncmod-backend-xml-utils gnc-backend-xml-utils gnc-engine
- gnc-core-utils ${LIBXML2_LDFLAGS} ${GLIB2_LDFLAGS} ${ZLIB_LIBRARY})
+ gnc-core-utils ${LIBXML2_LDFLAGS} PkgConfig::GLIB2 ${ZLIB_LIBRARY})
target_compile_definitions (gncmod-backend-xml-utils PRIVATE -DG_LOG_DOMAIN=\"gnc.backend.xml\" -DU_SHOW_CPLUSPLUS_API=0)
diff --git a/libgnucash/backend/xml/test/CMakeLists.txt b/libgnucash/backend/xml/test/CMakeLists.txt
index 6612da309..1838a53d9 100644
--- a/libgnucash/backend/xml/test/CMakeLists.txt
+++ b/libgnucash/backend/xml/test/CMakeLists.txt
@@ -8,7 +8,6 @@ set(XML_TEST_INCLUDE_DIRS
${CMAKE_SOURCE_DIR}/libgnucash/engine/test-core
${CMAKE_BINARY_DIR}/common # for config.h
${CMAKE_SOURCE_DIR}/common/test-core # for unittest-support.h
- ${GLIB2_INCLUDE_DIRS}
${LIBXML2_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS}
)
diff --git a/libgnucash/core-utils/CMakeLists.txt b/libgnucash/core-utils/CMakeLists.txt
index 7d7b8653d..2c77d45a0 100644
--- a/libgnucash/core-utils/CMakeLists.txt
+++ b/libgnucash/core-utils/CMakeLists.txt
@@ -44,14 +44,14 @@ target_include_directories(gnc-core-utils
${CMAKE_BINARY_DIR}/common
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
- ${GLIB2_INCLUDE_DIRS}
PRIVATE
${GTK_MAC_INCLUDE_DIRS})
target_link_libraries(gnc-core-utils
+ PUBLIC
+ PkgConfig::GLIB2
PRIVATE
${Boost_LIBRARIES}
- ${GLIB2_LDFLAGS}
${GOBJECT_LDFLAGS}
${GTK_MAC_LDFLAGS}
"$<$<BOOL:${MAC_INTEGRATION}>:${OSX_EXTRA_LIBRARIES}>")
diff --git a/libgnucash/core-utils/test/CMakeLists.txt b/libgnucash/core-utils/test/CMakeLists.txt
index 3b724c7c6..5d10837ff 100644
--- a/libgnucash/core-utils/test/CMakeLists.txt
+++ b/libgnucash/core-utils/test/CMakeLists.txt
@@ -4,7 +4,6 @@ set(CORE_UTILS_TEST_INCLUDE_DIRS
${CMAKE_BINARY_DIR}/common # for config.h
${MODULEPATH}
${CMAKE_SOURCE_DIR}/common/test-core
- ${GLIB2_INCLUDE_DIRS}
${GTK_MAC_INCLUDE_DIRS}
)
set(CORE_UTILS_TEST_LIBS gnc-core-utils test-core)
@@ -32,11 +31,10 @@ set(gtest_core_utils_INCLUDES
${CMAKE_BINARY_DIR}/common # for config.h
${CMAKE_SOURCE_DIR}/common # for platform.h
${CMAKE_BINARY_DIR}/libgnucash/core-utils # for gncla-dir.h
- ${GLIB2_INCLUDE_DIRS}
)
set(gtest_core_utils_LIBS
- ${GLIB2_LDFLAGS}
+ PkgConfig::GLIB2
${Boost_LIBRARIES}
${GTHREAD_LDFLAGS}
gtest)
diff --git a/libgnucash/engine/CMakeLists.txt b/libgnucash/engine/CMakeLists.txt
index 36d5d5776..068bca137 100644
--- a/libgnucash/engine/CMakeLists.txt
+++ b/libgnucash/engine/CMakeLists.txt
@@ -241,7 +241,7 @@ target_link_libraries(gnc-engine
${ICU4C_I18N_LDFLAGS}
${REGEX_LDFLAGS}
${GMODULE_LDFLAGS}
- ${GLIB2_LDFLAGS}
+ PkgConfig::GLIB2
${GOBJECT_LDFLAGS}
$<$<BOOL:${WIN32}>:bcrypt.lib>)
@@ -254,7 +254,6 @@ target_include_directories (gnc-engine
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_BINARY_DIR}/common # for config.h
${CMAKE_SOURCE_DIR}/common # for platform.h
- ${GLIB2_INCLUDE_DIRS}
${LIBINTL_INCLUDE_PATH}
${REGEX_INCLUDE_PATH}
${CMAKE_SOURCE_DIR}/borrowed/libc # for strptime.h
diff --git a/libgnucash/engine/test/CMakeLists.txt b/libgnucash/engine/test/CMakeLists.txt
index 03155e2cf..0f5b63970 100644
--- a/libgnucash/engine/test/CMakeLists.txt
+++ b/libgnucash/engine/test/CMakeLists.txt
@@ -6,7 +6,6 @@ set(ENGINE_TEST_INCLUDE_DIRS
${CMAKE_SOURCE_DIR}/libgnucash/engine/test-core
${CMAKE_BINARY_DIR}/common # for config.h
${CMAKE_SOURCE_DIR}/common/test-core # for unittest-support.h
- ${GLIB2_INCLUDE_DIRS}
)
set(ENGINE_TEST_LIBS gnc-engine gnc-test-engine test-core ${LIBXML2_LDFLAGS} -lm)
@@ -83,12 +82,12 @@ add_engine_test(test-numeric "${test_numeric_SOURCES}")
set(MODULEPATH ${CMAKE_SOURCE_DIR}/libgnucash/engine)
set(gtest_old_engine_LIBS
gnc-engine
- ${GLIB2_LDFLAGS}
+ PkgConfig::GLIB2
${Boost_LIBRARIES}
gtest)
set(gtest_qof_LIBS
- ${GLIB2_LDFLAGS}
+ PkgConfig::GLIB2
${GOBJECT_LDFLAGS}
${GMODULE_LDFLAGS}
${GTHREAD_LDFLAGS}
@@ -101,7 +100,6 @@ set(gtest_engine_INCLUDES
${CMAKE_SOURCE_DIR}/libgnucash/core-utils
${CMAKE_BINARY_DIR}/common # for config.h
${CMAKE_SOURCE_DIR}/common # for platform.h
- ${GLIB2_INCLUDE_DIRS}
../../../borrowed/libc
)
diff --git a/libgnucash/gnc-module/CMakeLists.txt b/libgnucash/gnc-module/CMakeLists.txt
index 1a6e0a6ca..b686d2472 100644
--- a/libgnucash/gnc-module/CMakeLists.txt
+++ b/libgnucash/gnc-module/CMakeLists.txt
@@ -17,7 +17,7 @@ add_library (gnc-module
${gnc_module_HEADERS}
)
-target_link_libraries(gnc-module ${GMODULE_LDFLAGS} ${GLIB2_LDFLAGS})
+target_link_libraries(gnc-module ${GMODULE_LDFLAGS} PkgConfig::GLIB2)
target_compile_definitions (gnc-module PRIVATE -DG_LOG_DOMAIN=\"gnc.module\")
@@ -25,7 +25,6 @@ target_include_directories (gnc-module
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/common
${CMAKE_BINARY_DIR}/common # for config.h
- ${GLIB2_INCLUDE_DIRS}
)
install(TARGETS gnc-module
diff --git a/libgnucash/gnc-module/test/CMakeLists.txt b/libgnucash/gnc-module/test/CMakeLists.txt
index d9f029989..f5c3e5629 100644
--- a/libgnucash/gnc-module/test/CMakeLists.txt
+++ b/libgnucash/gnc-module/test/CMakeLists.txt
@@ -7,7 +7,6 @@ set(GNC_MODULE_TEST_INCLUDE_DIRS
${CMAKE_BINARY_DIR}/common # for config.h
${CMAKE_SOURCE_DIR}/libgnucash/gnc-module
${CMAKE_SOURCE_DIR}/common/test-core
- ${GLIB2_INCLUDE_DIRS}
)
set(GNC_MODULE_TEST_LIBS
diff --git a/libgnucash/gnc-module/test/misc-mods/CMakeLists.txt b/libgnucash/gnc-module/test/misc-mods/CMakeLists.txt
index 7412ffe14..f29f20b36 100644
--- a/libgnucash/gnc-module/test/misc-mods/CMakeLists.txt
+++ b/libgnucash/gnc-module/test/misc-mods/CMakeLists.txt
@@ -1,17 +1,16 @@
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/libgnucash/gnc-module
- ${GLIB2_INCLUDE_DIRS}
)
add_library(gncmod-agedver EXCLUDE_FROM_ALL agedver.c)
-target_link_libraries(gncmod-agedver ${GLIB2_LDFLAGS})
+target_link_libraries(gncmod-agedver PkgConfig::GLIB2)
add_library(gncmod-futuremodsys EXCLUDE_FROM_ALL futuremodsys.c)
-target_link_libraries(gncmod-futuremodsys ${GLIB2_LDFLAGS})
+target_link_libraries(gncmod-futuremodsys PkgConfig::GLIB2)
add_library(gncmod-incompatdep EXCLUDE_FROM_ALL incompatdep.c)
-target_link_libraries(gncmod-incompatdep gnc-module ${GLIB2_LDFLAGS})
+target_link_libraries(gncmod-incompatdep gnc-module PkgConfig::GLIB2)
set_target_properties(gncmod-agedver gncmod-incompatdep PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${LIBDIR_BUILD}/gnucash/test
diff --git a/libgnucash/gnc-module/test/mod-ordinary/CMakeLists.txt b/libgnucash/gnc-module/test/mod-ordinary/CMakeLists.txt
index bd939eb7c..a1d53aa59 100644
--- a/libgnucash/gnc-module/test/mod-ordinary/CMakeLists.txt
+++ b/libgnucash/gnc-module/test/mod-ordinary/CMakeLists.txt
@@ -9,7 +9,6 @@ target_include_directories(gncmod-ordinary PRIVATE
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/common
${CMAKE_SOURCE_DIR}/libgnucash/gnc-module
- ${GLIB2_INCLUDE_DIRS}
${GUILE_INCLUDE_DIRS}
)
diff --git a/libgnucash/gnc-module/test/mod-withdep/CMakeLists.txt b/libgnucash/gnc-module/test/mod-withdep/CMakeLists.txt
index 514a68112..ba00ca3b3 100644
--- a/libgnucash/gnc-module/test/mod-withdep/CMakeLists.txt
+++ b/libgnucash/gnc-module/test/mod-withdep/CMakeLists.txt
@@ -15,7 +15,6 @@ target_include_directories(gncmod-withdep PRIVATE
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/common
${CMAKE_SOURCE_DIR}/libgnucash/gnc-module
- ${GLIB2_INCLUDE_DIRS}
${GUILE_INCLUDE_DIRS}
)
diff --git a/libgnucash/tax/CMakeLists.txt b/libgnucash/tax/CMakeLists.txt
index f5c9e5925..e0ffe9df7 100644
--- a/libgnucash/tax/CMakeLists.txt
+++ b/libgnucash/tax/CMakeLists.txt
@@ -10,15 +10,14 @@ target_link_libraries(gnc-locale-tax
gnc-engine
gnc-app-utils
gnucash-guile
- ${GLIB2_LDFLAGS}
+ PkgConfig::GLIB2
${GUILE_LDFLAGS})
target_include_directories(gnc-locale-tax
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE
${CMAKE_BINARY_DIR}/common
- ${GUILE_INCLUDE_DIRS}
- ${GLIB2_INCLUDE_DIRS})
+ ${GUILE_INCLUDE_DIRS})
if (APPLE)
set_target_properties (gnc-locale-tax PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
commit 17648ac91f552dda5ed8068eea538b8af2d42049
Author: Richard Cohen <richard at daijobu.co.uk>
Date: Sat Feb 18 18:57:31 2023 +0000
Remove unused ${GTK_INCLUDE_DIRS} and unneeded ${GTK3_INCLUDE_DIRS}
diff --git a/gnucash/gnome/test/CMakeLists.txt b/gnucash/gnome/test/CMakeLists.txt
index 89ff09736..bda612c8e 100644
--- a/gnucash/gnome/test/CMakeLists.txt
+++ b/gnucash/gnome/test/CMakeLists.txt
@@ -6,7 +6,6 @@ set(GNOME_TEST_INCLUDE_DIRS
${CMAKE_SOURCE_DIR}/gnucash/gnome/
${CMAKE_SOURCE_DIR}/gnucash/gnome-utils/
${GUILE_INCLUDE_DIRS}
- ${GTK3_INCLUDE_DIRS}
)
set(GNOME_TEST_LIBS
diff --git a/gnucash/import-export/aqb/test/CMakeLists.txt b/gnucash/import-export/aqb/test/CMakeLists.txt
index 8fd3a7098..abee7aa86 100644
--- a/gnucash/import-export/aqb/test/CMakeLists.txt
+++ b/gnucash/import-export/aqb/test/CMakeLists.txt
@@ -15,7 +15,6 @@ set(test_aqb_INCLUDE_DIRS
${CMAKE_SOURCE_DIR}/libgnucash/core-utils
${CMAKE_SOURCE_DIR}/libgnucash/gnc-module
${GLIB2_INCLUDE_DIRS}
- ${GTK_INCLUDE_DIRS}
${AQBANKING_INCLUDE_DIRS}
)
diff --git a/gnucash/import-export/test/CMakeLists.txt b/gnucash/import-export/test/CMakeLists.txt
index ccc21d263..a311e61e9 100644
--- a/gnucash/import-export/test/CMakeLists.txt
+++ b/gnucash/import-export/test/CMakeLists.txt
@@ -26,7 +26,6 @@ set(IMPORT_ACCOUNT_MATCHER_TEST_INCLUDE_DIRS
${CMAKE_SOURCE_DIR}/libgnucash/app-utils
${CMAKE_SOURCE_DIR}/gnucash/gnome-utils
${GLIB2_INCLUDE_DIRS}
- ${GTK3_INCLUDE_DIRS}
${GTEST_INCLUDE_DIR}
)
commit 27fe72496e9ce9611ed9d9aac2ce5906c206af3f
Author: Richard Cohen <richard at daijobu.co.uk>
Date: Sun Feb 19 23:29:13 2023 +0000
Remove unused ${GLIB_LIBS} ${GLIB_INCLUDE_DIRS}
They have been replaced by GLIB2_*
diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt
index 75e581bc6..345ba5aee 100644
--- a/bindings/python/CMakeLists.txt
+++ b/bindings/python/CMakeLists.txt
@@ -73,14 +73,13 @@ if(WITH_PYTHON)
${CMAKE_SOURCE_DIR}/libgnucash/app-utils
${CMAKE_SOURCE_DIR}/gnucash/gnome
${CMAKE_SOURCE_DIR}/libgnucash/core-utils
- ${GLIB_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS}
)
add_library(gnucash_core_c MODULE ${SWIG_GNUCASH_CORE_C})
target_include_directories(gnucash_core_c PRIVATE ${gnucash_core_c_INCLUDE_DIRS})
- target_link_libraries(gnucash_core_c gnc-app-utils gnc-engine ${GLIB_LIBS} ${PYTHON_LIBRARIES})
+ target_link_libraries(gnucash_core_c gnc-app-utils gnc-engine ${PYTHON_LIBRARIES})
set_target_properties(gnucash_core_c PROPERTIES PREFIX "_")
target_compile_options(gnucash_core_c PRIVATE -Wno-implicit -Wno-missing-prototypes -Wno-declaration-after-statement -Wno-missing-declarations)
if (HAVE_STRINGOP_TRUNCATION)
@@ -88,7 +87,7 @@ if(WITH_PYTHON)
endif()
add_executable(sqlite3test EXCLUDE_FROM_ALL sqlite3test.c ${SWIG_GNUCASH_CORE_C})
- target_link_libraries(sqlite3test gnc-app-utils gnc-engine ${GLIB_LIBS} ${PYTHON_LIBRARIES})
+ target_link_libraries(sqlite3test gnc-app-utils gnc-engine ${PYTHON_LIBRARIES})
target_include_directories(sqlite3test PRIVATE ${gnucash_core_c_INCLUDE_DIRS})
target_compile_options(sqlite3test PRIVATE -Wno-implicit -Wno-missing-prototypes -Wno-declaration-after-statement -Wno-missing-declarations)
if (HAVE_STRINGOP_TRUNCATION)
diff --git a/gnucash/python/CMakeLists.txt b/gnucash/python/CMakeLists.txt
index 9f3c30400..5ca656c06 100644
--- a/gnucash/python/CMakeLists.txt
+++ b/gnucash/python/CMakeLists.txt
@@ -15,7 +15,7 @@ if (WITH_PYTHON)
add_library(gncmod-python ${gncmod_python_SOURCES})
# target_link_libraries(gncmod-python gnc-module gnc-core-utils-python gnc-app-utils-python
target_link_libraries(gncmod-python gnc-module gnc-core-utils
- ${PYTHON_LIBRARIES} ${GLIB_LIBS}) # ${PYTHON_EXTRA_LIBS}
+ ${PYTHON_LIBRARIES}) # ${PYTHON_EXTRA_LIBS}
target_include_directories(gncmod-python
PRIVATE ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/libgnucash/core-utils ${CMAKE_SOURCE_DIR}/gnc-module ${PYTHON_INCLUDE_DIR})
target_compile_options(gncmod-python PRIVATE -DG_LOG_DOMAIN=\"gnc.python\")
commit c2a1cd10388c3cc77e8f079787ce353e8c5389c8
Author: Richard Cohen <richard at daijobu.co.uk>
Date: Sun Feb 19 23:32:15 2023 +0000
Remove unused ${GNOME_LDFLAGS}
diff --git a/gnucash/import-export/aqb/CMakeLists.txt b/gnucash/import-export/aqb/CMakeLists.txt
index 264ee7fdd..4a8da6849 100644
--- a/gnucash/import-export/aqb/CMakeLists.txt
+++ b/gnucash/import-export/aqb/CMakeLists.txt
@@ -67,7 +67,7 @@ if(WITH_AQBANKING)
gnc-register-gnome gnc-ledger-core gnc-engine gwengui-gtk3
${AQB_EXPORT_SYMBOLS} ${AQBANKING_LDFLAGS}
${GWENHYWFAR_LDFLAGS} ${GWEN_GTK3_LDFLAGS}
- ${GNOME_LDFLAGS} ${AQB_LIBSTDCXX})
+ ${AQB_LIBSTDCXX})
target_compile_definitions(gncmod-aqbanking PRIVATE -DG_LOG_DOMAIN=\"gnc.import.aqbanking\")
target_compile_options(gncmod-aqbanking PRIVATE -Wno-deprecated-declarations)
Summary of changes:
CMakeLists.txt | 36 ++++++++++++++++------
bindings/guile/CMakeLists.txt | 8 ++---
bindings/guile/test/CMakeLists.txt | 1 -
bindings/python/CMakeLists.txt | 5 ++-
common/config.h.cmake.in | 12 --------
common/test-core/CMakeLists.txt | 5 ++-
gnucash/CMakeLists.txt | 4 +--
gnucash/gnome-utils/CMakeLists.txt | 1 -
gnucash/gnome-utils/test/CMakeLists.txt | 2 --
gnucash/gnome/CMakeLists.txt | 1 -
gnucash/gnome/test/CMakeLists.txt | 1 -
gnucash/import-export/CMakeLists.txt | 2 +-
gnucash/import-export/aqb/CMakeLists.txt | 6 ++--
gnucash/import-export/aqb/test/CMakeLists.txt | 3 --
gnucash/import-export/csv-imp/test/CMakeLists.txt | 3 +-
.../import-export/customer-import/CMakeLists.txt | 2 +-
gnucash/import-export/test/CMakeLists.txt | 3 --
gnucash/python/CMakeLists.txt | 2 +-
gnucash/register/ledger-core/test/CMakeLists.txt | 1 -
libgnucash/app-utils/CMakeLists.txt | 4 +--
libgnucash/backend/dbi/test/CMakeLists.txt | 1 -
libgnucash/backend/sql/test/CMakeLists.txt | 1 -
libgnucash/backend/xml/CMakeLists.txt | 4 +--
libgnucash/backend/xml/test/CMakeLists.txt | 1 -
libgnucash/core-utils/CMakeLists.txt | 4 +--
libgnucash/core-utils/test/CMakeLists.txt | 4 +--
libgnucash/engine/CMakeLists.txt | 3 +-
libgnucash/engine/test/CMakeLists.txt | 6 ++--
libgnucash/gnc-module/CMakeLists.txt | 3 +-
libgnucash/gnc-module/test/CMakeLists.txt | 1 -
.../gnc-module/test/misc-mods/CMakeLists.txt | 7 ++---
.../gnc-module/test/mod-ordinary/CMakeLists.txt | 1 -
.../gnc-module/test/mod-withdep/CMakeLists.txt | 1 -
libgnucash/tax/CMakeLists.txt | 5 ++-
34 files changed, 57 insertions(+), 87 deletions(-)
More information about the gnucash-changes
mailing list