[Pkg-owncloud-commits] [qtkeychain] 13/63: Use find_dependency to find the dependencies

Sandro Knauß hefee at debian.org
Sat Jun 10 14:39:28 UTC 2017


This is an automated email from the git hooks/post-receive script.

hefee pushed a commit to branch master
in repository qtkeychain.

commit 0eaf3ad1a3717f634e628110eaf6953f8b023595
Author: Hannah von Reth <hannah.vonreth at kdab.com>
Date:   Fri Aug 5 11:00:55 2016 +0200

    Use find_dependency to find the dependencies
---
 CMakeLists.txt            |  6 +++---
 QtKeychainConfig.cmake.in | 23 ++++++++++++++++++++---
 2 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b78910f..c298144 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -114,10 +114,10 @@ endif()
 if(APPLE)
     list(APPEND qtkeychain_SOURCES keychain_mac.cpp)
 
-    find_library(COREFOUNDATION_LIBRARY CoreFoundation)
+    find_library(COREFOUNDATION_LIBRARY CoreFoundation REQUIRED)
     list(APPEND qtkeychain_LIBRARIES ${COREFOUNDATION_LIBRARY})
 
-    find_library(SECURITY_LIBRARY Security)
+    find_library(SECURITY_LIBRARY Security REQUIRED)
     list(APPEND qtkeychain_LIBRARIES ${SECURITY_LIBRARY})
 endif()
 
@@ -192,7 +192,7 @@ install(TARGETS ${QTKEYCHAIN_TARGET_NAME}
 )
 
 add_executable( testclient testclient.cpp )
-target_link_libraries( testclient ${QTKEYCHAIN_TARGET_NAME} ${qtkeychain_LIBRARIES})
+target_link_libraries( testclient ${QTKEYCHAIN_TARGET_NAME})
 
 
 ###
diff --git a/QtKeychainConfig.cmake.in b/QtKeychainConfig.cmake.in
index 74c1356..651237b 100644
--- a/QtKeychainConfig.cmake.in
+++ b/QtKeychainConfig.cmake.in
@@ -6,10 +6,27 @@
 # Compute paths
 get_filename_component(QTKEYCHAIN_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
 if(EXISTS "${QTKEYCHAIN_CMAKE_DIR}/CMakeCache.txt")
-   # In build tree
-   include("${QTKEYCHAIN_CMAKE_DIR}/Qt at QTKEYCHAIN_VERSION_INFIX@KeychainBuildTreeSettings.cmake")
+    # In build tree
+    include("${QTKEYCHAIN_CMAKE_DIR}/Qt at QTKEYCHAIN_VERSION_INFIX@KeychainBuildTreeSettings.cmake")
 else()
-   set(QTKEYCHAIN_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
+    set(QTKEYCHAIN_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
+endif()
+
+include(CMakeFindDependencyMacro)
+
+if("@QTKEYCHAIN_VERSION_INFIX@" STREQUAL "5")
+    find_dependency(Qt5Core)
+    
+    if(UNIX AND NOT APPLE)
+        find_dependency(Qt5DBus)
+    endif()
+else()
+    find_dependency(Qt4 COMPONENTS QtCore)
+endif()
+
+if(APPLE)
+    find_dependency(COREFOUNDATION_LIBRARY CoreFoundation)
+    find_dependency(SECURITY_LIBRARY Security)
 endif()
 
 # Our library dependencies (contains definitions for IMPORTED targets)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/qtkeychain.git



More information about the Pkg-owncloud-commits mailing list