-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
78 lines (66 loc) · 2.22 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
69
70
71
72
73
74
75
76
77
78
cmake_minimum_required(VERSION 2.8.12.2)
project(fjorge)
# Compiler command-line flags under development
# SET(CMAKE_C_FLAGS "-g -pg -Iinclude -O0 -Wall -ansi -pedantic -std=c11 -DDEBUG -D_FORTIFY_SOURCE=2 -D__STDC_VERSION__=201112L -D__GNUC__")
# Compiler command-line flags in production
SET(CMAKE_C_FLAGS "-Iinclude -fopenmp -I/usr/local/include -O0 -Wall -ansi -pedantic -std=c11 -DDEBUG -D_FORTIFY_SOURCE=2")
SET(CFLAGS CMAKE_C_FLAGS)
SET(CMAKE_LIBRARY_PATH_FLAG "-L/usr/lib/x86_64-linux-gnu -L/usr/local/lib -lstrglob")
SET(ENV{LD_LIBRARY_PATH} "/usr/local/lib:/usr/lib/x86_64-linux-gnu:$ENV{LD_LIBRARY_PATH}")
add_definitions(-DDBNG_PREFIX=\"${CMAKE_INSTALL_PREFIX}\")
add_custom_target(distclean
rm -f -- ./CMakeCache.txt
rm -f -- ./CMakeFiles
rm -f -- ./cmake_install.cmake
rm -f -- ./Makefile
COMMENT "Cleaning up build files" VERBATIM)
add_executable(
fjorge
src/add_header.c
src/auth_basic.c
src/callback_info.c
src/callback_message.c
src/callback_ocsp.c
src/callback_verify.c
src/dup_headers.c
src/encode_base64.c
src/encode_hex.c
src/fjputs_callback.c
src/fjprintf_callback.c
src/fjputs_debug.c
src/fjprintf_debug.c
src/fjputs_error.c
src/fjprintf_error.c
src/fjputs_verbose.c
src/fjprintf_verbose.c
src/main_function.c
src/pack_protover.c
src/parse_cmdline.c
src/output_x509nm.c
src/print_options.c
src/print_trace.c
src/create_serial.c
src/create_sockbio.c
src/signal_handler.c
src/connect_tcp.c
src/connect_tls.c
src/error_tcp.c
src/error_tls.c
src/recv_response.c
src/send_request.c
src/strcat_glob.c
src/unpack_protover.c
src/describe_usage.c
include/fjorge.h)
find_library(SSL ssl)
find_library(CRYPTO crypto)
find_library(STRGLOB strglob)
link_directories(/usr/lib/x86_64-linux-gnu /usr/local/lib)
add_library(ssl SHARED IMPORTED)
set_property(TARGET ssl PROPERTY IMPORTED_LOCATION /usr/lib/x86_64-linux-gnu/libssl.so)
add_library(crypto SHARED IMPORTED)
set_property(TARGET crypto PROPERTY IMPORTED_LOCATION /usr/lib/x86_64-linux-gnu/libcrypto.so)
add_library(strglob SHARED IMPORTED)
set_property(TARGET strglob PROPERTY IMPORTED_LOCATION /usr/local/lib/libstrglob.so)
target_link_libraries(fjorge ssl crypto strglob)
install(TARGETS fjorge DESTINATION bin)