-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
29 lines (22 loc) · 1.2 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
cmake_minimum_required(VERSION 3.10)
project(HE-Lib-Java)
set(CMAKE_CXX_STANDARD 17)
set(SEAL_IMPL_DIR "../../src/server/seal")
set(LATTIGO_IMPL_DIR "../../src/server/lattigo")
set(SMKHE_IMPL "../../src/server/smkhe/smkhe_he_server.cpp")
set(SMKHE_BUILD "$ENV{HOME}/Desktop/smkhe/lib/releases/macos")
set(SMKHE_INCLUDE_DIR "$ENV{HOME}/Desktop/smkhe/include")
set(BASE_IMPL_DIR "../../src/server")
set(UTIL_DIR "../../src/util/")
add_subdirectory(${LATTIGO_IMPL_DIR}/go lattigobuild)
find_package(JNI REQUIRED)
find_package(SEAL REQUIRED)
include_directories(${JNI_INCLUDE_DIRS} ${SEAL_INCLUDE_DIRS} ${SEAL_IMPL_DIR}
${UTIL_DIR} ${BASE_IMPL_DIR} ${BASE_IMPL_DIR}/base
${LATTIGO_IMPL_DIR}/cpp ${SMKHE_INCLUDE_DIR})
add_library(smkhe SHARED IMPORTED)
set_target_properties(smkhe PROPERTIES IMPORTED_LOCATION ${SMKHE_BUILD}/libsmkhe.dylib)
add_library(HELib SHARED ./dissertation_backend_JNIBridge.cpp ${SEAL_IMPL_DIR}/seal_he_server.cpp
${BASE_IMPL_DIR}/server_selector.cpp ${BASE_IMPL_DIR}/base/server_base.cpp ${UTIL_DIR}/util.cpp
${LATTIGO_IMPL_DIR}/cpp/lattigo_he_server.cpp ${SMKHE_IMPL})
target_link_libraries(HELib SEAL::seal liblattigoserver smkhe)