-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
68 lines (59 loc) · 1.59 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
cmake_minimum_required(VERSION 3.14)
project(
librrlcrypto
VERSION 0.1
DESCRIPTION "librrlcom crypto wrapper for Remote Run-time Linker."
LANGUAGES CXX
)
set(SOURCE_FILES
"lib/aes.cpp"
"lib/bytes.cpp"
"lib/crypto_connection.cpp"
"lib/crypto_courier.cpp"
"lib/evp_context.cpp"
"lib/exception.cpp"
"lib/random.cpp"
"lib/rsa.cpp"
)
set(HEADER_FILES
"include/rrlinker/crypto/aes.hpp"
"include/rrlinker/crypto/bytes.hpp"
"include/rrlinker/crypto/crypto_connection.hpp"
"include/rrlinker/crypto/crypto_courier.hpp"
"include/rrlinker/crypto/evp_context.hpp"
"include/rrlinker/crypto/exception.hpp"
"include/rrlinker/crypto/mode.hpp"
"include/rrlinker/crypto/operation.hpp"
"include/rrlinker/crypto/random.hpp"
"include/rrlinker/crypto/rsa.hpp"
)
add_library(${PROJECT_NAME} STATIC
${HEADER_FILES}
${SOURCE_FILES}
)
set_target_properties(
${PROJECT_NAME} PROPERTIES
CXX_STANDARD 20
CXX_STANDARD_REQUIRED ON
PUBLIC_HEADER "${HEADER_FILES}"
)
target_include_directories(${PROJECT_NAME} PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include>"
)
target_link_libraries(
${PROJECT_NAME}
PUBLIC librrlcom
)
if(UNIX)
target_link_libraries(${PROJECT_NAME} PUBLIC crypto)
else()
target_link_libraries(${PROJECT_NAME} PUBLIC libcrypto)
endif()
include(GNUInstallDirs)
install(
TARGETS ${PROJECT_NAME}
EXPORT crypto
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/rrlinker/crypto"
)
install(EXPORT crypto DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake")