mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-23 12:55:44 +03:00
Get rid of FindQt5Keychain.cmake
QtKeychain provides Qt5KeychainConfig.cmake and friends nowadays, so no need to have a less reliable and outdated find module on our end. Also this shows that we were including keychain.h in the wrong way and were not using the link target, so both got fixed as well. Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This commit is contained in:
parent
dfd6cce978
commit
3427dadaeb
9 changed files with 9 additions and 61 deletions
|
@ -1,50 +0,0 @@
|
|||
# (c) 2014 Copyright ownCloud GmbH
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING* file.
|
||||
|
||||
# - Try to find QtKeychain
|
||||
# Once done this will define
|
||||
# QTKEYCHAIN_FOUND - System has QtKeychain
|
||||
# QTKEYCHAIN_INCLUDE_DIRS - The QtKeychain include directories
|
||||
# QTKEYCHAIN_LIBRARIES - The libraries needed to use QtKeychain
|
||||
# QTKEYCHAIN_DEFINITIONS - Compiler switches required for using LibXml2
|
||||
|
||||
# When we build our own Qt we also need to build QtKeychain with it
|
||||
# so that it doesn't pull a different Qt version. For that reason
|
||||
# first look in the Qt lib directory for QtKeychain.
|
||||
get_target_property(_QTCORE_LIB_PATH Qt5::Core IMPORTED_LOCATION_RELEASE)
|
||||
|
||||
# Use PATH here because Debian 7.0 has CMake 2.8.9 and DIRECTORY is only available from 2.8.12+
|
||||
get_filename_component(QT_LIB_DIR "${_QTCORE_LIB_PATH}" PATH)
|
||||
|
||||
find_path(QTKEYCHAIN_INCLUDE_DIR
|
||||
NAMES
|
||||
keychain.h
|
||||
HINTS
|
||||
${QT_LIB_DIR}/../include
|
||||
PATH_SUFFIXES
|
||||
qt5keychain
|
||||
)
|
||||
|
||||
find_library(QTKEYCHAIN_LIBRARY
|
||||
NAMES
|
||||
qt5keychain
|
||||
lib5qtkeychain
|
||||
HINTS
|
||||
${QT_LIB_DIR}
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/lib/${CMAKE_ARCH_TRIPLET}
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
${CMAKE_LIBRARY_PATH}
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set QTKEYCHAIN_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
find_package_handle_standard_args(Qt5Keychain DEFAULT_MSG
|
||||
QTKEYCHAIN_LIBRARY QTKEYCHAIN_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(QTKEYCHAIN_INCLUDE_DIR QTKEYCHAIN_LIBRARY)
|
|
@ -227,9 +227,8 @@ set( final_src
|
|||
${3rdparty_MOC}
|
||||
)
|
||||
|
||||
if(QTKEYCHAIN_FOUND OR QT5KEYCHAIN_FOUND)
|
||||
list(APPEND libsync_LINK_TARGETS ${QTKEYCHAIN_LIBRARY})
|
||||
include_directories(${QTKEYCHAIN_INCLUDE_DIR})
|
||||
if(Qt5Keychain_FOUND)
|
||||
list(APPEND libsync_LINK_TARGETS qt5keychain)
|
||||
endif()
|
||||
|
||||
# add executable icon on windows and osx
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "owncloudgui.h"
|
||||
#include "syncengine.h"
|
||||
|
||||
#include <keychain.h>
|
||||
#include <qt5keychain/keychain.h>
|
||||
|
||||
using namespace QKeychain;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include <QApplication>
|
||||
|
||||
#include <keychain.h>
|
||||
#include <qt5keychain/keychain.h>
|
||||
|
||||
using namespace OCC;
|
||||
using namespace QKeychain;
|
||||
|
|
|
@ -106,8 +106,7 @@ target_link_libraries(${synclib_NAME}
|
|||
|
||||
if (NOT TOKEN_AUTH_ONLY)
|
||||
find_package(Qt5 REQUIRED COMPONENTS Widgets Svg)
|
||||
target_link_libraries(${synclib_NAME} Qt5::Widgets Qt5::Svg ${QTKEYCHAIN_LIBRARY})
|
||||
target_include_directories(${synclib_NAME} PRIVATE ${QTKEYCHAIN_INCLUDE_DIR})
|
||||
target_link_libraries(${synclib_NAME} Qt5::Widgets Qt5::Svg qt5keychain)
|
||||
endif()
|
||||
|
||||
if(INOTIFY_FOUND)
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include <QJsonObject>
|
||||
#include <QJsonArray>
|
||||
|
||||
#include <keychain.h>
|
||||
#include <qt5keychain/keychain.h>
|
||||
#include "creds/abstractcredentials.h"
|
||||
|
||||
using namespace QKeychain;
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <QUuid>
|
||||
#include <QScopeGuard>
|
||||
|
||||
#include <keychain.h>
|
||||
#include <qt5keychain/keychain.h>
|
||||
#include "common/utility.h"
|
||||
|
||||
#include "wordlist.h"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <QJsonDocument>
|
||||
#include <QBuffer>
|
||||
|
||||
#include <keychain.h>
|
||||
#include <qt5keychain/keychain.h>
|
||||
|
||||
#include "account.h"
|
||||
#include "accessmanager.h"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#define KEYCHAINCHUNK_H
|
||||
|
||||
#include <QObject>
|
||||
#include <keychain.h>
|
||||
#include <qt5keychain/keychain.h>
|
||||
#include "accountfwd.h"
|
||||
|
||||
// We don't support insecure fallback
|
||||
|
|
Loading…
Reference in a new issue