-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
53 lines (41 loc) · 1.48 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
cmake_minimum_required(VERSION 3.0.0)
project(lwe-pvss VERSION 0.1.0)
# Use -std=c++17 as default.
set(CMAKE_CXX_STANDARD 17)
# Dependencies are GMP/NTL and libsodium
# Add directories for extra cmake files, e.g. to find NTK and other libraries
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
find_package(GMP)
# define the following variables (see ./cmake/FindNTL.make)
# GMP_FOUND
# GMP_LIBRARIES
# GMP_HEADERS
find_package(NTL)
# define the following variables (see ./cmake/FindNTL.make)
# NTL_FOUND
# NTL_LIBRARIES
# NTL_HEADERS
find_package(sodium)
# define the following variables (see ./cmake/FindSodium.make)
# sodium_FOUND
# sodium_INCLUDE_DIR
# sodium_LIBRARY_DEBUG
# sodium_LIBRARY_RELEASE
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
# Source files are found under the src directory
file(GLOB SOURCES src/*/*.cpp src/libmerlin/merlin.c)
add_library(lwe-pvss STATIC ${SOURCES})
target_include_directories(lwe-pvss PUBLIC
${NTL_INCLUDE_PATHS}
${sodium_INCLUDE_DIR}
)
set(PROJECT_LIBS lwe-pvss ${sodium_LIBRARY_DEBUG} ${NTL_LIBRARIES} ${GMP_LIBRARIES} pthread)
# SET(EXTRAOBJS "${CMAKE_CURRENT_SOURCE_DIR}/src/libmerlin/merlin.o")
add_executable(lwe-pvss-main src/main.cpp)
target_link_libraries(lwe-pvss-main PUBLIC ${PROJECT_LIBS})
include(CTest)
enable_testing()
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/tests")
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)