[Pkg-owncloud-commits] [owncloud-client] 137/333: Find Qt5 version of QtKeychain when built with Qt5
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu Apr 17 23:16:44 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 3f4bcbbd62a4cf15d4691e0afd750f2b49332b02
Author: Daniel Molkentin <danimo at owncloud.com>
Date: Wed Mar 12 18:38:59 2014 +0100
Find Qt5 version of QtKeychain when built with Qt5
---
CMakeLists.txt | 10 +++++++---
cmake/modules/FindQt5Keychain.cmake | 29 +++++++++++++++++++++++++++++
2 files changed, 36 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 507f2bb..c188acb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -78,12 +78,16 @@ endif()
# find_package(Qt4 4.7.0 COMPONENTS QtDBus REQUIRED )
#endif()
find_package(Neon REQUIRED)
-find_package(QtKeychain REQUIRED)
+if (Qt5Core_DIR)
+ find_package(Qt5Keychain REQUIRED)
+else()
+ find_package(QtKeychain REQUIRED)
+endif()
Find_package(Sparkle)
if(UNIX)
-find_package(INotify REQUIRED)
+ find_package(INotify REQUIRED)
else()
-find_package(INotify)
+ find_package(INotify)
endif()
find_package(Sphinx)
find_package(PdfLatex)
diff --git a/cmake/modules/FindQt5Keychain.cmake b/cmake/modules/FindQt5Keychain.cmake
new file mode 100644
index 0000000..b80a73d
--- /dev/null
+++ b/cmake/modules/FindQt5Keychain.cmake
@@ -0,0 +1,29 @@
+# - 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
+
+find_path(QTKEYCHAIN_INCLUDE_DIR qt5keychain/keychain.h)
+
+find_library(QTKEYCHAIN_LIBRARY
+ NAMES
+ qt5keychain
+ lib5qtkeychain
+ 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(QtKeychain DEFAULT_MSG
+ QTKEYCHAIN_LIBRARY QTKEYCHAIN_INCLUDE_DIR)
+
+mark_as_advanced(QTKEYCHAIN_INCLUDE_DIR QTKEYCHAIN_LIBRARY)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list