gnucash stable: Bug 799480 - Fails to build with ICU 76

John Ralls jralls at code.gnucash.org
Sat Dec 21 19:57:30 EST 2024


Updated	 via  https://github.com/Gnucash/gnucash/commit/579eed1f (commit)
	from  https://github.com/Gnucash/gnucash/commit/a716cca4 (commit)



commit 579eed1facc0f7834ea70b1a342ebca0f125d788
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Dec 21 16:56:00 2024 -0800

    Bug 799480 - Fails to build with ICU 76
    
    Use CMake find_package instead of pkg-config.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc731b33ed..0f9d0ad921 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -561,8 +561,7 @@ get_filename_component(PERL_DIR ${PERL_EXECUTABLE} DIRECTORY)
 find_program(POD2MAN_EXECUTABLE pod2man HINTS ${PERL_DIR})
 
 #ICU
-pkg_check_modules (ICU4C REQUIRED icu-uc)
-pkg_check_modules (ICU4C_I18N REQUIRED icu-i18n)
+find_package(ICU REQUIRED COMPONENTS uc i18n)
 
 pkg_check_modules (LIBSECRET libsecret-1>=0.18)
 IF (LIBSECRET_FOUND)
diff --git a/gnucash/import-export/csv-imp/CMakeLists.txt b/gnucash/import-export/csv-imp/CMakeLists.txt
index b164c7cac6..67add00860 100644
--- a/gnucash/import-export/csv-imp/CMakeLists.txt
+++ b/gnucash/import-export/csv-imp/CMakeLists.txt
@@ -62,7 +62,7 @@ add_library(gnc-csv-import ${csv_import_noinst_HEADERS}
 target_link_libraries(
   gnc-csv-import
   ${Boost_LIBRARIES}
-  ${ICU4C_I18N_LDFLAGS}
+  ${ICU_LIBRARIES}
   gnc-generic-import
   gnc-gnome-utils
   gnc-app-utils
diff --git a/gnucash/import-export/test/CMakeLists.txt b/gnucash/import-export/test/CMakeLists.txt
index 7d1d1c8dc2..0c9b34dab2 100644
--- a/gnucash/import-export/test/CMakeLists.txt
+++ b/gnucash/import-export/test/CMakeLists.txt
@@ -49,7 +49,7 @@ set(gtest_import_backend_LIBS
   ${Boost_LIBRARIES}
   ${GMODULE_LDFLAGS}
   ${GTHREAD_LDFLAGS}
-  ${ICU4C_I18N_LDFLAGS}
+  ${ICU_LIBRARIES}
   gmock
   gtest
 )
diff --git a/libgnucash/engine/CMakeLists.txt b/libgnucash/engine/CMakeLists.txt
index 630d8fd1fb..4797652a9d 100644
--- a/libgnucash/engine/CMakeLists.txt
+++ b/libgnucash/engine/CMakeLists.txt
@@ -237,7 +237,7 @@ target_link_libraries(gnc-engine
     gnc-core-utils
     ${Boost_DATE_TIME_LIBRARY}
     ${Boost_REGEX_LIBRARY}
-    ${ICU4C_I18N_LDFLAGS}
+    ${ICU_LIBRARIES}
     ${REGEX_LDFLAGS}
     ${GMODULE_LDFLAGS}
     PkgConfig::GLIB2
diff --git a/libgnucash/engine/test/CMakeLists.txt b/libgnucash/engine/test/CMakeLists.txt
index 4608ecac31..c920f0d38a 100644
--- a/libgnucash/engine/test/CMakeLists.txt
+++ b/libgnucash/engine/test/CMakeLists.txt
@@ -91,7 +91,7 @@ set(gtest_qof_LIBS
   ${GOBJECT_LDFLAGS}
   ${GMODULE_LDFLAGS}
   ${GTHREAD_LDFLAGS}
-  ${ICU4C_I18N_LDFLAGS}
+  ${ICU_LIBRARIES}
   ${Boost_LIBRARIES}
   gtest)
 



Summary of changes:
 CMakeLists.txt                               | 3 +--
 gnucash/import-export/csv-imp/CMakeLists.txt | 2 +-
 gnucash/import-export/test/CMakeLists.txt    | 2 +-
 libgnucash/engine/CMakeLists.txt             | 2 +-
 libgnucash/engine/test/CMakeLists.txt        | 2 +-
 5 files changed, 5 insertions(+), 6 deletions(-)



More information about the gnucash-changes mailing list