-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
55 lines (46 loc) · 1.66 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
cmake_minimum_required(VERSION 3.9)
project(kvalidator)
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Release)
ENDIF()
set(SRCS_LIB
"${CMAKE_CURRENT_SOURCE_DIR}/builtin/builtin.c"
"${CMAKE_CURRENT_SOURCE_DIR}/validator/validator.c"
"${CMAKE_CURRENT_SOURCE_DIR}/utils/fs.c"
"${CMAKE_CURRENT_SOURCE_DIR}/elf/elf-parser.c"
"${CMAKE_CURRENT_SOURCE_DIR}/crypto/sha256.c"
"${CMAKE_CURRENT_SOURCE_DIR}/crypto/pkcs1.c"
"${CMAKE_CURRENT_SOURCE_DIR}/cert/base64.c"
"${CMAKE_CURRENT_SOURCE_DIR}/cert/asn1-oid.c"
"${CMAKE_CURRENT_SOURCE_DIR}/cert/asn1-parser.c"
"${CMAKE_CURRENT_SOURCE_DIR}/cert/asn1-types.c"
"${CMAKE_CURRENT_SOURCE_DIR}/cert/x509-name.c"
"${CMAKE_CURRENT_SOURCE_DIR}/cert/x509-path.c"
"${CMAKE_CURRENT_SOURCE_DIR}/cert/x509-pubkey.c"
"${CMAKE_CURRENT_SOURCE_DIR}/cert/x509.c"
"${CMAKE_CURRENT_SOURCE_DIR}/cert/pem-parser.c"
"${CMAKE_CURRENT_SOURCE_DIR}/cert/cert-validator.c"
"${CMAKE_CURRENT_SOURCE_DIR}/dso/rsa.c"
"${CMAKE_CURRENT_SOURCE_DIR}/dso/bignum.c"
)
set(SRCS_DSO_CLI
"${CMAKE_CURRENT_SOURCE_DIR}/dso/cli_main.c"
)
include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}/include"
)
set(COMMON_WARNINGS "-Wall")
set(CMAKE_C_FLAGS_DEBUG "-g ${COMMON_WARNINGS}")
set(CMAKE_C_FLAGS_RELEASE "-O2 ${COMMON_WARNINGS}")
set(CMAKE_C_FLAGS_PROFILE "-O2 -pg ${COMMON_WARNINGS}")
add_library(kvalidator STATIC ${SRCS_LIB})
add_executable(dso_cli ${SRCS_DSO_CLI})
target_link_libraries(dso_cli
kvalidator
)
install(TARGETS kvalidator dso_cli
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
PUBLIC_HEADER DESTINATION include
)