-
Notifications
You must be signed in to change notification settings - Fork 11
/
CMakeLists.txt
49 lines (42 loc) · 1.5 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
cmake_minimum_required(VERSION 3.13.0)
project(SymCrypt-OpenSSL
VERSION 1.6.1
DESCRIPTION "The SymCrypt engine for OpenSSL (SCOSSL)"
HOMEPAGE_URL "https://github.com/microsoft/SymCrypt-OpenSSL")
find_package(OpenSSL REQUIRED)
if (SYMCRYPT_ROOT_DIR)
include_directories(${SYMCRYPT_ROOT_DIR}/inc)
else()
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_check_modules(SYMCRYPT REQUIRED symcrypt>=103.6.0)
message(STATUS "SymCrypt Includes: ${SYMCRYPT_INCLUDE_DIRS}")
include_directories(${SYMCRYPT_INCLUDE_DIRS})
else()
message(FATAL_ERROR "Provide symcrypt pkg-config or set SYMCRYPT_ROOT_DIR variable")
endif()
endif (SYMCRYPT_ROOT_DIR)
# In Sanitize version, enable sanitizers
if (CMAKE_BUILD_TYPE MATCHES Sanitize)
add_compile_options(-fsanitize=address)
add_compile_options(-fsanitize=leak)
add_compile_options(-fsanitize=undefined)
add_compile_options(-fno-sanitize-recover=all)
add_link_options(-fsanitize=address)
add_link_options(-fsanitize=leak)
add_link_options(-fsanitize=undefined)
add_link_options(-fno-sanitize-recover=all)
endif()
if (CMAKE_BUILD_TYPE MATCHES Release|RelWithDebInfo)
message("Release mode")
else()
message("Debug mode")
add_compile_options(-DDBG=1)
endif()
add_subdirectory (ScosslCommon)
add_subdirectory (SymCryptEngine/static)
add_subdirectory (SymCryptEngine/dynamic)
add_subdirectory (SslPlay)
if (${OPENSSL_VERSION} VERSION_GREATER_EQUAL 3)
add_subdirectory (SymCryptProvider)
endif()