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.
This commit is contained in:
Benjamin Gordon 2018-06-12 23:19:48 -06:00
parent 6c03d07e00
commit 8cae602e66
3 changed files with 9 additions and 4 deletions

View File

@ -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)

View File

@ -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.

View File

@ -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}
)