gnucash master: Convert GtkMacIntegration to package-style dependencies.

John Ralls jralls at code.gnucash.org
Sun Sep 15 16:14:36 EDT 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/6753b30b (commit)
	from  https://github.com/Gnucash/gnucash/commit/ecbc4864 (commit)



commit 6753b30b86a2574a36b09eaa2a8ea4a85356db87
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Sep 15 12:27:25 2019 -0700

    Convert GtkMacIntegration to package-style dependencies.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index be361c2fb..da3522d43 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -403,7 +403,7 @@ if(APPLE)
   if(TARGET_RESULT STREQUAL "quartz")
     set(GNC_PLATFORM_COCOA 1)
     set(GDK_QUARTZ 1)
-    pkg_check_modules(GTK_MAC gtk-mac-integration-gtk3)
+    pkg_check_modules(GTK_MAC IMPORTED_TARGET gtk-mac-integration-gtk3)
     if (GTK_MAC_FOUND)
       set(MAC_INTEGRATION 1)
       find_library(COCOA_LIBRARY Cocoa)
diff --git a/gnucash/CMakeLists.txt b/gnucash/CMakeLists.txt
index c8e9b332b..44f82e0ff 100644
--- a/gnucash/CMakeLists.txt
+++ b/gnucash/CMakeLists.txt
@@ -53,7 +53,8 @@ endif (BUILDING_FROM_VCS)
 target_link_libraries (gnucash
    gncmod-ledger-core gnc-gnome gncmod-gnome-utils gncmod-app-utils
    gncmod-engine gnc-module gnc-core-utils gncmod-report
-   PkgConfig::GLIB2 PkgConfig::GTK3 PkgConfig::GUILE ${GTK_MAC_LDFLAGS}
+   PkgConfig::GLIB2 PkgConfig::GTK3 PkgConfig::GUILE
+   $<$<BOOL:${GTK_MAC_FOUND}>:PkgConfig::GTK_MAC>
 )
 
 # Get glib executable for generating the gresource file
diff --git a/gnucash/gnome-utils/CMakeLists.txt b/gnucash/gnome-utils/CMakeLists.txt
index 5dc3c3a19..ea389e443 100644
--- a/gnucash/gnome-utils/CMakeLists.txt
+++ b/gnucash/gnome-utils/CMakeLists.txt
@@ -203,8 +203,9 @@ add_library (gncmod-gnome-utils
 )
 
 target_link_libraries(gncmod-gnome-utils gncmod-app-utils gncmod-engine
-  gnc-backend-xml-utils PkgConfig::GTK3 ${CMAKE_DL_LIBS} $<$<BOOL:${LIBSECRET_FOUND}>:PkgConfig::LIBSECRET>
-  ${GTK_MAC_LDFLAGS})
+  gnc-backend-xml-utils PkgConfig::GTK3 ${CMAKE_DL_LIBS}
+  $<$<BOOL:${LIBSECRET_FOUND}>:PkgConfig::LIBSECRET>
+  $<$<BOOL:${GTK_MAC_FOUND}>:PkgConfig::GTK_MAC>)
 
 target_compile_options(gncmod-gnome-utils PRIVATE -Wno-deprecated-declarations)
 target_compile_definitions(gncmod-gnome-utils PUBLIC ${GTK_MAC_CFLAGS_OTHER}
@@ -223,7 +224,6 @@ target_include_directories(gncmod-gnome-utils
     PUBLIC
       ${CMAKE_CURRENT_SOURCE_DIR}
     PRIVATE
-      ${GTK_MAC_INCLUDE_DIRS}
       ${CMAKE_CURRENT_BINARY_DIR}
 )
 
diff --git a/gnucash/gnome/CMakeLists.txt b/gnucash/gnome/CMakeLists.txt
index b03a07652..8e1698822 100644
--- a/gnucash/gnome/CMakeLists.txt
+++ b/gnucash/gnome/CMakeLists.txt
@@ -136,8 +136,10 @@ set (gnc_gnome_SOURCES
 set_source_files_properties (${gnc_gnome_SOURCES} PROPERTIES OBJECT_DEPENDS ${CONFIG_H})
 
 add_library (gnc-gnome ${gnc_gnome_SOURCES} ${gnc_gnome_noinst_HEADERS} ${SWIG_GNOME_C})
-target_link_libraries(gnc-gnome gncmod-gnome-search gncmod-ledger-core gncmod-html gncmod-report
-    gncmod-register-gnome gncmod-register-core gncmod-gnome-utils gncmod-engine PkgConfig::GTK3 ${GTK_MAC_LDFLAGS})
+target_link_libraries(gnc-gnome gncmod-gnome-search gncmod-ledger-core
+  gncmod-html gncmod-report gncmod-register-gnome gncmod-register-core
+  gncmod-gnome-utils gncmod-engine PkgConfig::GTK3
+  $<$<BOOL:${GTK_MAC_FOUND}>:PkgConfig::GTK_MAC>)
 
 target_compile_definitions (gnc-gnome PRIVATE -DG_LOG_DOMAIN=\"gnc.gui\" ${GTK_MAC_CFLAGS_OTHER})
 target_compile_options(gnc-gnome PRIVATE -Wno-deprecated-declarations)
@@ -148,7 +150,6 @@ target_include_directories(gnc-gnome
     ${CMAKE_SOURCE_DIR}/libgnucash/app-utils/calculation
     ${CMAKE_SOURCE_DIR}/gnucash/html
     ${CMAKE_BINARY_DIR}/gnucash/gnome-utils # for gnc-warnings.h
-    ${GTK_MAC_INCLUDE_DIRS}
 )
 
 add_dependencies (gnc-gnome swig-runtime-h)
diff --git a/libgnucash/core-utils/CMakeLists.txt b/libgnucash/core-utils/CMakeLists.txt
index 03e3153bc..9e307bcf5 100644
--- a/libgnucash/core-utils/CMakeLists.txt
+++ b/libgnucash/core-utils/CMakeLists.txt
@@ -95,14 +95,15 @@ set(core_utils_noinst_HEADERS
 )
 
 set(core_utils_ALL_SOURCES ${core_utils_SOURCES} ${core_utils_noinst_HEADERS})
-set(core_utils_ALL_LIBRARIES Boost::regex Boost::locale Boost::filesystem PkgConfig::GUILE PkgConfig::GLIB2 PkgConfig::GOBJECT ${GTK_MAC_LDFLAGS})
+set(core_utils_ALL_LIBRARIES Boost::regex Boost::locale Boost::filesystem
+  PkgConfig::GUILE PkgConfig::GLIB2 PkgConfig::GOBJECT
+  $<$<BOOL:${GTK_MAC_FOUND}>:PkgConfig::GTK_MAC>)
 set(core_utils_ALL_INCLUDES
   ${CMAKE_SOURCE_DIR}/common
   ${CMAKE_BINARY_DIR}/common
   ${CMAKE_CURRENT_BINARY_DIR}
   ${CMAKE_CURRENT_SOURCE_DIR}
-  ${GTK_MAC_INCLUDE_DIRS})
-
+)
 set_local_dist(core_utils_DIST_local ${core_utils_ALL_SOURCES} CMakeLists.txt core-utils.i core-utils.scm gncla-dir.h.in)
 set(core_utils_DIST ${core_utils_DIST_local} ${test_core_utils_DIST} PARENT_SCOPE)
 
diff --git a/libgnucash/core-utils/test/CMakeLists.txt b/libgnucash/core-utils/test/CMakeLists.txt
index 492415b42..72f863416 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
-  ${GTK_MAC_INCLUDE_DIRS}
 )
 set(CORE_UTILS_TEST_LIBS gnc-core-utils test-core)
 if (MAC_INTEGRATION)
diff --git a/libgnucash/engine/CMakeLists.txt b/libgnucash/engine/CMakeLists.txt
index f2a57fa28..8dd1786bb 100644
--- a/libgnucash/engine/CMakeLists.txt
+++ b/libgnucash/engine/CMakeLists.txt
@@ -238,7 +238,7 @@ else()
 endif()
 
 target_link_libraries(gncmod-engine gnc-core-utils gnc-module
-  Boost::date_time Boost::regex ICU::i18n
+  Boost::date_time Boost::regex ICU::i18n ICU::uc
   ${BCRYPT} ${REGEX_LDFLAGS} PkgConfig::GMODULE PkgConfig::GLIB2
   PkgConfig::GOBJECT PkgConfig::GUILE)
 



Summary of changes:
 CMakeLists.txt                            | 2 +-
 gnucash/CMakeLists.txt                    | 3 ++-
 gnucash/gnome-utils/CMakeLists.txt        | 6 +++---
 gnucash/gnome/CMakeLists.txt              | 7 ++++---
 libgnucash/core-utils/CMakeLists.txt      | 7 ++++---
 libgnucash/core-utils/test/CMakeLists.txt | 1 -
 libgnucash/engine/CMakeLists.txt          | 2 +-
 7 files changed, 15 insertions(+), 13 deletions(-)



More information about the gnucash-changes mailing list