From 37a79e3ad4b44dfbde1d63e6e46994886d439417 Mon Sep 17 00:00:00 2001 From: "Tobias C. Berner" Date: Sat, 19 May 2018 13:59:24 +0200 Subject: [PATCH] Use IMPORTED_TARGET for GnomeKeyring. Summary: Otherwise we would need to append also GNOME_KEYRING_LIBRARY_DIRS to link_directories. ``` /usr/bin/ld: cannot find -lgnome-keyring c++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. ``` Reviewers: #falkon, #automotive, kkofler, drosca Subscribers: falkon Tags: #falkon Differential Revision: https://phabricator.kde.org/D12980 --- CMakeLists.txt | 2 +- src/plugins/GnomeKeyringPasswords/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1dd3adc7c..b3f583c4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -100,7 +100,7 @@ find_package(PkgConfig) if (PKG_CONFIG_FOUND) option(BUILD_KEYRING "Gnome keyring password plugin" ON) if (BUILD_KEYRING) - pkg_check_modules(GNOME_KEYRING gnome-keyring-1) + pkg_check_modules(GNOME_KEYRING IMPORTED_TARGET gnome-keyring-1 ) endif() endif() diff --git a/src/plugins/GnomeKeyringPasswords/CMakeLists.txt b/src/plugins/GnomeKeyringPasswords/CMakeLists.txt index 6dd837c29..bc27ee23e 100644 --- a/src/plugins/GnomeKeyringPasswords/CMakeLists.txt +++ b/src/plugins/GnomeKeyringPasswords/CMakeLists.txt @@ -14,5 +14,5 @@ qt5_add_resources(RSCS ${GnomeKeyringPasswords_RSCS}) add_library(GnomeKeyringPasswords MODULE ${GnomeKeyringPasswords_SRCS} ${RSCS}) install(TARGETS GnomeKeyringPasswords DESTINATION ${FALKON_INSTALL_PLUGINDIR}) -target_link_libraries(GnomeKeyringPasswords ${GNOME_KEYRING_LIBRARIES} FalkonPrivate) +target_link_libraries(GnomeKeyringPasswords PkgConfig::GNOME_KEYRING FalkonPrivate)