-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathecdaa-config.cmake.in
51 lines (41 loc) · 1.58 KB
/
ecdaa-config.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
get_filename_component(ecdaa_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(ECDAA_TPM_SUPPORT @ECDAA_TPM_SUPPORT@)
################################################################################
# Find dependencies
################################################################################
include(CMakeFindDependencyMacro)
list(APPEND CMAKE_MODULE_PATH ${ecdaa_CMAKE_DIR})
find_dependency(AMCL 4.7.0)
if(ECDAA_TPM_SUPPORT)
find_dependency(TSS2)
endif()
list(REMOVE_AT CMAKE_MODULE_PATH -1)
################################################################################
# Include ecdaa targets
################################################################################
if(NOT TARGET ecdaa::ecdaa)
include("${ecdaa_CMAKE_DIR}/ecdaa-targets.cmake")
endif()
set(ecdaa_LIBRARIES ecdaa::ecdaa)
################################################################################
# Verify that required components were included in build
################################################################################
if(ecdaa_FIND_COMPONENTS)
if(NOT ecdaa_FIND_QUIETLY)
message(STATUS "Found the following ECDAA components:")
endif()
foreach(comp ${ecdaa_FIND_COMPONENTS})
if(comp STREQUAL "tpm" AND ECDAA_TPM_SUPPORT)
set(ecdaa_tpm_FOUND 1)
if(NOT ecdaa_FIND_QUIETLY)
message(STATUS " ${comp}")
endif()
list(APPEND ecdaa_LIBRARIES ecdaa::ecdaa-tpm)
else()
set(ecdaa_${comp}_FOUND 0)
if(ecdaa_FIND_REQUIRED_${comp})
message(FATAL_ERROR "ecdaa::${comp} not available.")
endif()
endif()
endforeach()
endif()