gnucash maint: Add support for libsecret to cmake
John Ralls
jralls at code.gnucash.org
Thu Jun 14 12:51:04 EDT 2018
Updated via https://github.com/Gnucash/gnucash/commit/8cae602e (commit)
from https://github.com/Gnucash/gnucash/commit/6c03d07e (commit)
commit 8cae602e66f593bb2af1c5bbcbd3e48476a58596
Author: Benjamin Gordon <ben at bxg.org>
Date: Tue Jun 12 23:19:48 2018 -0600
Add support for libsecret to cmake
gnucash has historically supported storing passwords for database
backends with libsecret when HAVE_LIBSECRET is defined. The code is
still present, but support for detecting libsecret's availablity was not
ported over when the build system was converted to cmake. This change
restores the missing detection.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 989d579..8207055 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -505,6 +505,11 @@ find_program(POD2MAN_EXECUTABLE pod2man HINTS ${PERL_DIR})
gnc_pkg_check_modules (ICU4C REQUIRED icu-uc)
gnc_pkg_check_modules (ICU4C_I18N REQUIRED icu-i18n)
+GNC_PKG_CHECK_MODULES (LIBSECRET libsecret-1>=0.18)
+IF (LIBSECRET_FOUND)
+ SET (HAVE_LIBSECRET ON)
+ENDIF (LIBSECRET_FOUND)
+
#BOOST
set (Boost_USE_MULTITHREADED ON)
set (Boost_FIND_QUIETLY ON)
diff --git a/cmake/README_CMAKE.txt b/cmake/README_CMAKE.txt
index 8d2ce15..c0ca35d 100644
--- a/cmake/README_CMAKE.txt
+++ b/cmake/README_CMAKE.txt
@@ -45,9 +45,8 @@ Limitations include:
* Not all options available in `./configure` have been ported to
this CMake system.
- * Password management is included for OS X, but not
- tested. Gnome-keyring and libsecret support has not
- been ported over.
+ * Password management is included for OS X and libsecret, but not
+ tested. Gnome-keyring support has not been ported over.
* The Xcode build only supports the Debug configuration. Others such
as Release are not supported yet.
diff --git a/gnucash/gnome-utils/CMakeLists.txt b/gnucash/gnome-utils/CMakeLists.txt
index f772cb0..4f1bac7 100644
--- a/gnucash/gnome-utils/CMakeLists.txt
+++ b/gnucash/gnome-utils/CMakeLists.txt
@@ -212,7 +212,7 @@ add_library (gncmod-gnome-utils
)
target_link_libraries(gncmod-gnome-utils gncmod-app-utils gncmod-engine gnc-backend-xml-utils
- ${CMAKE_DL_LIBS} ${GTK3_LDFLAGS} ${GTK_MAC_LDFLAGS})
+ ${CMAKE_DL_LIBS} ${GTK3_LDFLAGS} ${LIBSECRET_LDFLAGS} ${GTK_MAC_LDFLAGS})
target_compile_definitions(gncmod-gnome-utils PUBLIC ${GTK_MAC_CFLAGS_OTHER}
PRIVATE -DG_LOG_DOMAIN=\"gnc.gui\")
@@ -232,6 +232,7 @@ target_include_directories(gncmod-gnome-utils
${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE
${GTK_MAC_INCLUDE_DIRS}
+ ${LIBSECRET_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
)
Summary of changes:
CMakeLists.txt | 5 +++++
cmake/README_CMAKE.txt | 5 ++---
gnucash/gnome-utils/CMakeLists.txt | 3 ++-
3 files changed, 9 insertions(+), 4 deletions(-)
More information about the gnucash-changes
mailing list