generated from PrincetonUniversity/template-ila
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
72 lines (54 loc) · 1.94 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
cmake_minimum_required(VERSION 3.8)
# ---------------------------------------------------------------------------- #
# PROJECT
# name version language
# ---------------------------------------------------------------------------- #
project(AES VERSION 1.0 LANGUAGES CXX)
# ---------------------------------------------------------------------------- #
# VARIABLE
# alias and configurations
# ---------------------------------------------------------------------------- #
set(AES_TARGET ${PROJECT_NAME})
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
# ---------------------------------------------------------------------------- #
# External dependencies
# ---------------------------------------------------------------------------- #
##
## ilang
##
find_package(ilang REQUIRED)
##
## Python (required if CMake version < 3.12)
##
if(${CMAKE_VERSION} VERSION_LESS 3.12)
if(NOT TARGET Python::Python)
add_library(Python::Python IMPORTED INTERFACE)
set_property(TARGET Python::Python
PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PYTHON_INCLUDE_DIRECTORIES}
)
set_property(TARGET Python::Python
PROPERTY INTERFACE_LINK_LIBRARIES ${PYTHON_LIBRARIES}
)
endif()
endif()
# ---------------------------------------------------------------------------- #
# TARGET
# library
# ---------------------------------------------------------------------------- #
add_library(${AES_TARGET}
src/aes_128.cc
src/aes_child.cc
src/aes_ila.cc
src/aes_util.cc
)
target_include_directories(${AES_TARGET} PRIVATE include)
target_link_libraries(${AES_TARGET} PUBLIC ilang::ilang)
# ---------------------------------------------------------------------------- #
# TARGET
# executable
# ---------------------------------------------------------------------------- #
add_executable(${AES_TARGET}Exe
app/main.cc
)
target_include_directories(${AES_TARGET}Exe PRIVATE include)
target_link_libraries(${AES_TARGET}Exe ${AES_TARGET})