Warning, /libraries/qca/cmake/modules/FindPkcs11Helper.cmake is written in an unsupported language. File is not indexed.
0001 # - Try to find the pkcs11-helper library
0002 # Once done this will define
0003 #
0004 # PKCS11H_FOUND - system has pkcs11-helper
0005 # PKCS11H_INCLUDE_DIRS - the pkcs11-helper include directories
0006 # PKCS11H_LDFLAGS - Link to these to use pkcs11-helper
0007 # PKCS11H_CFLAGS_OTHER - Compiler switches required for using pkcs11-helper
0008 #
0009 # Copyright (c) 2006, Laurent Montel, <montel@kde.org>
0010 #
0011 # Redistribution and use is allowed according to the terms of the BSD license.
0012 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
0013 #
0014 # pkcs11-helper can be found at http://www.opensc-project.org/pkcs11-helper
0015 #
0016
0017 if(PKCS11H_INCLUDE_DIRS AND PKCS11H_LDFLAGS)
0018
0019 # in cache already
0020 SET(PKCS11H_FOUND TRUE)
0021
0022 else()
0023 if(NOT WIN32)
0024 find_package(PkgConfig)
0025 pkg_search_module(PKCS11H libpkcs11-helper-1)
0026 endif()
0027
0028 if (PKCS11H_FOUND)
0029 if (NOT Pkcs11Helper_FIND_QUIETLY)
0030 message(STATUS "Found pkcs11-helper: ${PKCS11H_LDFLAGS}")
0031 endif()
0032 else()
0033 if (Pkcs11Helper_FIND_REQUIRED)
0034 message(FATAL_ERROR "Could NOT find pkcs11-helper")
0035 endif()
0036 endif()
0037
0038 mark_as_advanced(PKCS11H_INCLUDE_DIRS PKCS11H_LDFLAGS PKCS11H_CFLAGS_OTHER)
0039
0040 endif()