-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
81 lines (63 loc) · 2.42 KB
/
CMakeLists.txt
File metadata and controls
81 lines (63 loc) · 2.42 KB
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
73
74
75
76
77
78
79
80
cmake_minimum_required(VERSION 3.10)
project(minkipc)
# Build Mink TEEC library
option(BUILD_MINKTEEC "Build MinkTEEC" TRUE)
option(BUILD_UNITTEST "Build unittest" FALSE)
# Build Time listener
option(BUILD_TIME_LISTENER "Build Time Listener" TRUE)
# Build TA Autoload listener
option(BUILD_TA_AUTOLOAD_LISTENER "Build TA autoload Listener" TRUE)
# Build File system listener
option(BUILD_FS_LISTENER "Build File system Listener" TRUE)
# Build Secure File system listener
option(BUILD_GPFS_LISTENER "Build GP File system Listener" TRUE)
# Use GLib for strlcat/strlcpy fallback
option(USE_GLIB "Use GLIB functions" FALSE)
# Use pkg-config for discovering install target directory
option(CFG_USE_PKGCONFIG "Use pkg-config for discovering install target directory for systemd and udev files." OFF)
# Build RPMB listener
option(BUILD_RPMB_LISTENER "Build RPMB Listener" TRUE)
# Build PKCS-11
option(BUILD_PKCS11 "Build PKCS#11" TRUE)
include(GNUInstallDirs)
set(MINKIDLC_BIN_DIR "${CMAKE_CURRENT_SOURCE_DIR}/idlc" CACHE PATH "Directory containing the idlc executable")
set(SYSTEMD_UNIT_DIR "" CACHE PATH "Directory containing the systemd unit path")
set(UDEV_DIR "" CACHE PATH "Directory containing the UDEV path")
set(MINKIPC_LIBEXEC_DIR "" CACHE PATH "Directory containing the libexec script/binaries path")
set(PERSIST_MOUNT_UNIT "" CACHE PATH "Name of the systemd unit responsible for mounting the persist partition")
if ("${MINKIDLC_BIN_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/idlc")
file(DOWNLOAD
https://github.com/quic/mink-idl-compiler/releases/download/v0.2.0/idlc
${MINKIDLC_BIN_DIR}/idlc
)
endif()
file(CHMOD ${MINKIDLC_BIN_DIR}/idlc PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)
add_compile_options(
-Wall -Wextra -Werror -Wshadow -Wcast-align
-Wmissing-declarations -Wformat-security -Wmissing-noreturn
-Wdeprecated -fPIC
)
add_subdirectory(libminkadaptor)
if (BUILD_MINKTEEC)
add_subdirectory(libminkteec)
endif()
add_subdirectory(qtee_supplicant)
add_subdirectory(listeners/listenercbo)
if(BUILD_TIME_LISTENER)
add_subdirectory(listeners/libtimeservice)
endif()
if(BUILD_TA_AUTOLOAD_LISTENER)
add_subdirectory(listeners/libtaautoload)
endif()
if(BUILD_FS_LISTENER OR BUILD_GPFS_LISTENER)
add_subdirectory(listeners/libfsservice)
endif()
if(BUILD_RPMB_LISTENER)
add_subdirectory(listeners/librpmbservice)
endif()
if (BUILD_PKCS11)
add_subdirectory(optee-client)
if (BUILD_UNITTEST)
add_subdirectory(optee-test)
endif()
endif()