2014-12-04 14:57:27 +00:00
|
|
|
# - Try to find QCA2 (Qt Cryptography Architecture 2)
|
|
|
|
# Once done this will define
|
|
|
|
#
|
|
|
|
# QCA2_FOUND - system has QCA2
|
|
|
|
# QCA2_INCLUDE_DIR - the QCA2 include directory
|
|
|
|
# QCA2_LIBRARIES - the libraries needed to use QCA2
|
|
|
|
# QCA2_DEFINITIONS - Compiler switches required for using QCA2
|
|
|
|
#
|
|
|
|
# use pkg-config to get the directories and then use these values
|
|
|
|
# in the FIND_PATH() and FIND_LIBRARY() calls
|
|
|
|
|
|
|
|
# Copyright (c) 2006, Michael Larouche, <michael.larouche@kdemail.net>
|
2020-02-07 00:14:00 +00:00
|
|
|
# Copyright (c) 2020, Ivailo Monev, <xakepa10@gmail.com>
|
2014-12-04 14:57:27 +00:00
|
|
|
#
|
|
|
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
|
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
|
|
|
|
2020-02-07 00:14:00 +00:00
|
|
|
set(QCA2_NAMES qca2-katie qca2)
|
2014-12-04 14:57:27 +00:00
|
|
|
|
2020-02-07 00:14:00 +00:00
|
|
|
find_package(PkgConfig)
|
|
|
|
foreach(name ${QCA2_NAMES})
|
|
|
|
if(NOT PC_QCA2_FOUND)
|
|
|
|
pkg_check_modules(PC_QCA2 QUIET ${name})
|
|
|
|
endif()
|
|
|
|
endforeach()
|
2014-12-04 14:57:27 +00:00
|
|
|
|
2020-02-07 00:14:00 +00:00
|
|
|
set(QCA2_DEFINITIONS ${PC_QCA2_CFLAGS_OTHER})
|
2014-12-04 14:57:27 +00:00
|
|
|
|
2020-02-07 00:14:00 +00:00
|
|
|
find_path(QCA2_INCLUDE_DIR
|
|
|
|
NAMES QtCrypto
|
|
|
|
HINTS ${PC_QCA2_INCLUDEDIR}
|
|
|
|
PATH_SUFFIXES Qca-katie/QtCrypto Qca/QtCrypto QtCrypto
|
|
|
|
)
|
2014-12-04 14:57:27 +00:00
|
|
|
|
2020-02-07 00:14:00 +00:00
|
|
|
find_library(QCA2_LIBRARIES
|
|
|
|
NAMES qca-katie qca
|
|
|
|
HINTS ${PC_QCA2_LIBDIR}
|
|
|
|
)
|
2014-12-04 14:57:27 +00:00
|
|
|
|
2020-02-07 00:14:00 +00:00
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(QCA2
|
|
|
|
REQUIRED_VARS QCA2_LIBRARIES QCA2_INCLUDE_DIR
|
|
|
|
VERSION_VAR PC_QCA2_VERSION
|
|
|
|
)
|
2014-12-04 14:57:27 +00:00
|
|
|
|
2020-02-07 00:14:00 +00:00
|
|
|
mark_as_advanced(QCA2_INCLUDE_DIR QCA2_LIBRARIES)
|