Debian Codegraph @

cmake/Modules/Findsofthsm.cmake

raw
1 # - Try to find softhsm
2 # Once done this will define
3 #
4 # SOFTHSM_FOUND - system has softhsm
5 # SOFTHSM_LIBRARIES - Link these to use softhsm
6 #
7 #=============================================================================
8 # Copyright (c) 2019 Sahana Prasad <[email protected]>
9 #
10 # Distributed under the OSI-approved BSD License (the "License");
11 # see accompanying file Copyright.txt for details.
12 #
13 # This software is distributed WITHOUT ANY WARRANTY; without even the
14 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 # See the License for more information.
16 #=============================================================================
17 #
18
19
20 find_library(SOFTHSM2_LIBRARY
21 NAMES
22 softhsm2
23 )
24
25 if (SOFTHSM2_LIBRARY)
26 set(SOFTHSM_LIBRARIES
27 ${SOFTHSM_LIBRARIES}
28 ${SOFTHSM2_LIBRARY}
29 )
30 endif (SOFTHSM2_LIBRARY)
31
32 include(FindPackageHandleStandardArgs)
33 find_package_handle_standard_args(softhsm DEFAULT_MSG SOFTHSM_LIBRARIES)
34
35 # show the SOFTHSM_INCLUDE_DIR and SOFTHSM_LIBRARIES variables only in the advanced view
36 mark_as_advanced(SOFTHSM_LIBRARIES)