-
Notifications
You must be signed in to change notification settings - Fork 709
/
CMakeLists.txt
41 lines (33 loc) · 1.33 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
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
cmake_minimum_required(VERSION 3.13)
project(SEALExamples VERSION 4.1.1 LANGUAGES CXX)
# If not called from root CMakeLists.txt
if(NOT DEFINED SEAL_BUILD_EXAMPLES)
set(SEAL_BUILD_EXAMPLES ON)
# Import Microsoft SEAL
find_package(SEAL 4.1.1 EXACT REQUIRED)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
endif()
if(SEAL_BUILD_EXAMPLES)
add_executable(sealexamples)
target_sources(sealexamples
PRIVATE
${CMAKE_CURRENT_LIST_DIR}/examples.cpp
${CMAKE_CURRENT_LIST_DIR}/1_bfv_basics.cpp
${CMAKE_CURRENT_LIST_DIR}/2_encoders.cpp
${CMAKE_CURRENT_LIST_DIR}/3_levels.cpp
${CMAKE_CURRENT_LIST_DIR}/4_bgv_basics.cpp
${CMAKE_CURRENT_LIST_DIR}/5_ckks_basics.cpp
${CMAKE_CURRENT_LIST_DIR}/6_rotation.cpp
${CMAKE_CURRENT_LIST_DIR}/7_serialization.cpp
${CMAKE_CURRENT_LIST_DIR}/8_performance.cpp
)
if(TARGET SEAL::seal)
target_link_libraries(sealexamples PRIVATE SEAL::seal)
elseif(TARGET SEAL::seal_shared)
target_link_libraries(sealexamples PRIVATE SEAL::seal_shared)
else()
message(FATAL_ERROR "Cannot find target SEAL::seal or SEAL::seal_shared")
endif()
endif()