-
Notifications
You must be signed in to change notification settings - Fork 91
/
CMakeLists.txt
65 lines (52 loc) · 1.16 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
cmake_minimum_required(VERSION 2.8.12)
project(sscep)
if (WIN32)
set(OPENSSL_USE_STATIC_LIBS TRUE)
endif()
set(OPENSSL_MIN_VERSION 1.1.0)
find_package(OpenSSL REQUIRED)
option(ENABLE_ENGINES "Enable support for OpenSSL ENGINE API")
# For IDE such as Visual Studio we include also the header files
set(SSCEP_SOURCES
src/sscep.c
src/sscep.h
src/conf.h
src/cmd.h
src/getopt.c
src/getopt.h
src/configuration.c
src/configuration.h
src/net.c
src/picohttpparser.c
src/picohttpparser.h
src/ias.c
src/ias.h
src/pkcs7.c
src/fileutils.c
src/fileutils_capi.h
src/sceputils.c
)
if (ENABLE_ENGINES)
set(SSCEP_SOURCES
${SSCEP_SOURCES}
src/engine.c
src/engine.h
)
add_definitions(-DWITH_ENGINES)
endif()
if (MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
add_executable(${PROJECT_NAME} ${SSCEP_SOURCES})
include_directories(${OPENSSL_INCLUDE_DIR})
target_link_libraries(${PROJECT_NAME}
${OPENSSL_LIBRARIES}
)
if (WIN32)
target_link_libraries(${PROJECT_NAME} wsock32 ws2_32)
endif()
install(
TARGETS ${PROJECT_NAME}
DESTINATION bin
)
include(CPack)