-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
57 lines (39 loc) · 1.7 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
cmake_minimum_required(VERSION 3.20)
project(ringsnark LANGUAGES CXX)
# Local header files here ONLY
# Executables
add_executable(vppc Driver.cpp)
target_sources(vppc PRIVATE ${CMAKE_CURRENT_LIST_DIR}/Driver.cpp)
target_link_libraries(vppc PRIVATE ringsnark)
add_executable(vppc2 Driver_larger_params.cpp)
target_sources(vppc2 PRIVATE ${CMAKE_CURRENT_LIST_DIR}/Driver_larger_params.cpp)
target_link_libraries(vppc2 PRIVATE ringsnark)
add_executable(vppc3 Driver_eq_check.cpp)
target_sources(vppc3 PRIVATE ${CMAKE_CURRENT_LIST_DIR}/Driver_eq_check.cpp)
target_link_libraries(vppc3 PRIVATE ringsnark)
add_executable(vppc4 Driver_larger_ptxt.cpp)
target_sources(vppc4 PRIVATE ${CMAKE_CURRENT_LIST_DIR}/Driver_larger_ptxt.cpp)
target_link_libraries(vppc4 PRIVATE ringsnark)
#add_executable(bench)
#target_sources(bench PRIVATE ${CMAKE_CURRENT_LIST_DIR}/microbench.cpp)
#target_link_libraries(bench PRIVATE ringsnark)
# Includes
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/depends")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/ringsnark")
target_include_directories(ringsnark INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include/)
include_directories(.)
# Libraries
## lib: SEAL
# find_package(SEAL 4.0 REQUIRED)
if (TARGET SEAL::seal)
target_link_libraries(ringsnark INTERFACE SEAL::seal)
elseif (TARGET SEAL::seal_shared)
target_link_libraries(ringsnark INTERFACE SEAL::seal_shared)
else ()
message(FATAL_ERROR "Cannot find target SEAL::seal or SEAL::seal_shared")
endif ()
find_package(Boost 1.82.0 COMPONENTS math)
## lib: polytools
target_link_libraries(ringsnark INTERFACE polytools)
target_include_directories(ringsnark INTERFACE ${Boost_INCLUDE_DIRS})
target_link_libraries(ringsnark INTERFACE ${Boost_LIBRARIES})