-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathCMakeLists.txt
90 lines (74 loc) · 2.86 KB
/
CMakeLists.txt
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
cmake_minimum_required(VERSION 3.5)
include(cmake/platform.cmake)
set(USE_ASM ON CACHE BOOL "Use asm implementation for Fr and Fq")
project(witnesscalc LANGUAGES CXX ASM)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
message("USE_ASM=" ${USE_ASM})
message("CMAKE_CROSSCOMPILING=" ${CMAKE_CROSSCOMPILING})
message("GMP_PREFIX=" ${GMP_PREFIX})
message("GMP_INCLUDE_DIR=" ${GMP_INCLUDE_DIR})
message("GMP_LIB_DIR=" ${GMP_LIB_DIR})
if (NOT EXISTS ${GMP_INCLUDE_FILE_FULLPATH})
message("WARNING: ${GMP_INCLUDE_FILE_FULLPATH} is not found and so system ${GMP_INCLUDE_FILE} is used.")
endif()
if (NOT EXISTS ${GMP_LIB_FILE_FULLPATH})
message("WARNING: ${GMP_LIB_FILE_FULLPATH} is not found and so system ${GMP_LIB_FILE} is used.")
set(GMP_LIB gmp)
endif()
include_directories(BEFORE ${GMP_INCLUDE_DIR})
add_subdirectory(src)
install(TARGETS
tests
test_platform
authV2
witnesscalc_authV2
witnesscalc_authV2Static
credentialAtomicQueryMTPV2
witnesscalc_credentialAtomicQueryMTPV2
witnesscalc_credentialAtomicQueryMTPV2Static
credentialAtomicQuerySigV2
witnesscalc_credentialAtomicQuerySigV2
witnesscalc_credentialAtomicQuerySigV2Static
credentialAtomicQueryMTPV2OnChain
witnesscalc_credentialAtomicQueryMTPV2OnChain
witnesscalc_credentialAtomicQueryMTPV2OnChainStatic
credentialAtomicQuerySigV2OnChain
witnesscalc_credentialAtomicQuerySigV2OnChain
witnesscalc_credentialAtomicQuerySigV2OnChainStatic
credentialAtomicQueryV3
witnesscalc_credentialAtomicQueryV3
witnesscalc_credentialAtomicQueryV3Static
credentialAtomicQueryV3OnChain
witnesscalc_credentialAtomicQueryV3OnChain
witnesscalc_credentialAtomicQueryV3OnChainStatic
linkedMultiQuery10
witnesscalc_linkedMultiQuery10
witnesscalc_linkedMultiQuery10Static
fr
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
BUNDLE DESTINATION ${CMAKE_INSTALL_PREFIX}/app
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install(FILES "${GMP_LIB_DIR}/${GMP_LIB_FILE}"
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install(FILES
src/authV2.dat
src/credentialAtomicQuerySigV2.dat
src/credentialAtomicQueryMTPV2.dat
src/credentialAtomicQuerySigV2OnChain.dat
src/credentialAtomicQueryMTPV2OnChain.dat
src/credentialAtomicQueryV3.dat
src/credentialAtomicQueryV3OnChain.dat
src/linkedMultiQuery10.dat
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(FILES
src/witnesscalc.h
src/witnesscalc_authV2.h
src/witnesscalc_credentialAtomicQuerySigV2.h
src/witnesscalc_credentialAtomicQueryMTPV2.h
src/witnesscalc_credentialAtomicQuerySigV2OnChain.h
src/witnesscalc_credentialAtomicQueryMTPV2OnChain.h
src/witnesscalc_credentialAtomicQueryV3.h
src/witnesscalc_credentialAtomicQueryV3OnChain.h
src/witnesscalc_linkedMultiQuery10.h
DESTINATION ${CMAKE_INSTALL_PREFIX}/include)