From 43a51c1befed05bcf546ca9ea826c8dc2d0e3818 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Wed, 4 Feb 2015 13:03:28 +0100 Subject: [PATCH] Fix the MinGW build - qtkeychain isn't necessarily in a qt5keychain subdirectory. - Explicitly add OpenSSL to the include directories - Make sure that the USE_OUR_OWN_SQLITE3 code is initialized for csync by calling find_package. --- cmake/modules/FindQt5Keychain.cmake | 7 ++++++- csync/CMakeLists.txt | 2 ++ src/gui/CMakeLists.txt | 1 + src/libsync/CMakeLists.txt | 1 + src/libsync/creds/httpcredentials.cpp | 6 +----- src/libsync/creds/shibbolethcredentials.cpp | 6 +----- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/cmake/modules/FindQt5Keychain.cmake b/cmake/modules/FindQt5Keychain.cmake index a26e562ff..3156cc76b 100644 --- a/cmake/modules/FindQt5Keychain.cmake +++ b/cmake/modules/FindQt5Keychain.cmake @@ -9,7 +9,12 @@ # QTKEYCHAIN_LIBRARIES - The libraries needed to use QtKeychain # QTKEYCHAIN_DEFINITIONS - Compiler switches required for using LibXml2 -find_path(QTKEYCHAIN_INCLUDE_DIR qt5keychain/keychain.h) +find_path(QTKEYCHAIN_INCLUDE_DIR + NAMES + keychain.h + PATH_SUFFIXES + qt5keychain + ) find_library(QTKEYCHAIN_LIBRARY NAMES diff --git a/csync/CMakeLists.txt b/csync/CMakeLists.txt index 757725786..eeecc38dc 100644 --- a/csync/CMakeLists.txt +++ b/csync/CMakeLists.txt @@ -28,6 +28,8 @@ if (NOT WIN32) find_package(Iconv) endif (NOT WIN32) +find_package(SQLite3 3.8.0 REQUIRED) + include(ConfigureChecks.cmake) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 921c0ea5d..727621689 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -138,6 +138,7 @@ set(3rdparty_INC ) include_directories(${3rdparty_INC}) +include_directories(${OPENSSL_INCLUDE_DIR}) # csync is required. include_directories(${CMAKE_SOURCE_DIR}/csync/src diff --git a/src/libsync/CMakeLists.txt b/src/libsync/CMakeLists.txt index 80d47033b..967d2f589 100644 --- a/src/libsync/CMakeLists.txt +++ b/src/libsync/CMakeLists.txt @@ -12,6 +12,7 @@ include_directories(${CMAKE_SOURCE_DIR}/csync/src ${CMAKE_BINARY_DIR}/csync/src ) include_directories(${CMAKE_SOURCE_DIR}/src/3rdparty/qjson) +include_directories(${OPENSSL_INCLUDE_DIR}) if ( APPLE ) list(APPEND OS_SPECIFIC_LINK_LIBRARIES diff --git a/src/libsync/creds/httpcredentials.cpp b/src/libsync/creds/httpcredentials.cpp index 590dfa7f2..a2801dd16 100644 --- a/src/libsync/creds/httpcredentials.cpp +++ b/src/libsync/creds/httpcredentials.cpp @@ -19,11 +19,7 @@ #include #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) -#include -#else -#include -#endif +#include #include "account.h" #include "accessmanager.h" diff --git a/src/libsync/creds/shibbolethcredentials.cpp b/src/libsync/creds/shibbolethcredentials.cpp index de7803cb9..f1b97b97b 100644 --- a/src/libsync/creds/shibbolethcredentials.cpp +++ b/src/libsync/creds/shibbolethcredentials.cpp @@ -32,11 +32,7 @@ #include "cookiejar.h" #include "syncengine.h" -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) -#include -#else -#include -#endif +#include using namespace QKeychain;