diff options
-rw-r--r-- | cmake/modules/FindQt5Keychain.cmake | 50 | ||||
-rw-r--r-- | src/gui/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/gui/proxyauthhandler.cpp | 2 | ||||
-rw-r--r-- | src/libsync/CMakeLists.txt | 21 | ||||
-rw-r--r-- | src/libsync/creds/httpcredentials.cpp | 2 |
5 files changed, 14 insertions, 66 deletions
diff --git a/cmake/modules/FindQt5Keychain.cmake b/cmake/modules/FindQt5Keychain.cmake deleted file mode 100644 index 4aff32d6f..000000000 --- a/cmake/modules/FindQt5Keychain.cmake +++ /dev/null @@ -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) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 334052d6d..7beef5144 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -184,9 +184,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(TARGET qt5keychain) + list(APPEND libsync_LINK_TARGETS qt5keychain) endif() # add executable icon on windows and osx diff --git a/src/gui/proxyauthhandler.cpp b/src/gui/proxyauthhandler.cpp index f2ccd97ac..fc6e9357c 100644 --- a/src/gui/proxyauthhandler.cpp +++ b/src/gui/proxyauthhandler.cpp @@ -21,7 +21,7 @@ #include <QApplication> -#include <keychain.h> +#include <qt5keychain/keychain.h> using namespace OCC; diff --git a/src/libsync/CMakeLists.txt b/src/libsync/CMakeLists.txt index faaa707f9..0f21dac51 100644 --- a/src/libsync/CMakeLists.txt +++ b/src/libsync/CMakeLists.txt @@ -97,16 +97,16 @@ set(creds_HEADERS IF (NOT APPLE) INSTALL( FILES ${owncloudsync_HEADERS} - DESTINATION ${INCLUDE_INSTALL_DIR}/${synclib_NAME}/mirall + DESTINATION ${INCLUDE_INSTALL_DIR}/${synclib_NAME}/mirall ) INSTALL( FILES ${creds_HEADERS} - DESTINATION ${INCLUDE_INSTALL_DIR}/${synclib_NAME}/creds + DESTINATION ${INCLUDE_INSTALL_DIR}/${synclib_NAME}/creds ) ENDIF(NOT APPLE) add_library(${synclib_NAME} SHARED ${libsync_SRCS}) -target_link_libraries(${synclib_NAME} +target_link_libraries(${synclib_NAME} PUBLIC "${csync_NAME}" ${OS_SPECIFIC_LINK_LIBRARIES} Qt5::Core Qt5::Network @@ -115,25 +115,24 @@ target_link_libraries(${synclib_NAME} if (NOT TOKEN_AUTH_ONLY) find_package(Qt5 REQUIRED COMPONENTS Widgets) - target_link_libraries(${synclib_NAME} Qt5::Widgets ${QTKEYCHAIN_LIBRARY}) - target_include_directories(${synclib_NAME} PRIVATE ${QTKEYCHAIN_INCLUDE_DIR}) + target_link_libraries(${synclib_NAME} PUBLIC Qt5::Widgets qt5keychain) endif() if(Inotify_FOUND) target_include_directories(${synclib_NAME} PRIVATE ${Inotify_INCLUDE_DIRS}) - target_link_libraries(${synclib_NAME} ${Inotify_LIBRARIES} ) + target_link_libraries(${synclib_NAME} PUBLIC ${Inotify_LIBRARIES} ) endif() GENERATE_EXPORT_HEADER( ${synclib_NAME} - BASE_NAME ${synclib_NAME} - EXPORT_MACRO_NAME OWNCLOUDSYNC_EXPORT + BASE_NAME ${synclib_NAME} + EXPORT_MACRO_NAME OWNCLOUDSYNC_EXPORT EXPORT_FILE_NAME owncloudlib.h - STATIC_DEFINE OWNCLOUD_BUILT_AS_STATIC + STATIC_DEFINE OWNCLOUD_BUILT_AS_STATIC ) set_target_properties( ${synclib_NAME} PROPERTIES - VERSION ${MIRALL_VERSION} - SOVERSION ${MIRALL_SOVERSION} + VERSION ${MIRALL_VERSION} + SOVERSION ${MIRALL_SOVERSION} ) install(TARGETS ${synclib_NAME} ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) diff --git a/src/libsync/creds/httpcredentials.cpp b/src/libsync/creds/httpcredentials.cpp index c70c91b98..2a771ac76 100644 --- a/src/libsync/creds/httpcredentials.cpp +++ b/src/libsync/creds/httpcredentials.cpp @@ -22,7 +22,7 @@ #include <QJsonDocument> #include <QBuffer> -#include <keychain.h> +#include <qt5keychain/keychain.h> #include "account.h" #include "accessmanager.h" |