-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
52 lines (42 loc) · 2 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
cmake_minimum_required(VERSION 3.0)
project(Zia C CXX)
set(CMAKE_BUILD_TYPE Debug)
include(openZia/openZia/openZia.cmake)
#include(modules/httpModule/httpModule.cmake)
## Zia Server
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/zia)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/zia/Logging)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/zia/Config)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/zia/Network)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/zia/Network/Client)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/openZia/openZia)
add_executable(
zia
${CMAKE_CURRENT_SOURCE_DIR}/zia/Config/Config.cpp
${CMAKE_CURRENT_SOURCE_DIR}/zia/Logging/Logging.cpp
${CMAKE_CURRENT_SOURCE_DIR}/zia/Network/NetworkManager.cpp
${CMAKE_CURRENT_SOURCE_DIR}/zia/Network/Client/Client.cpp
${CMAKE_CURRENT_SOURCE_DIR}/zia/main.cpp
)
target_link_libraries(zia ${openZiaLibs})
target_include_directories(zia PRIVATE ${openZiaIncludes})
find_package (Threads)
target_link_libraries (zia ${CMAKE_THREAD_LIBS_INIT})
## Modules
include(modules/httpParseRequest/httpParseRequest.cmake)
include(modules/httpCheckRequest/httpCheckRequest.cmake)
include(modules/httpGet/httpGet.cmake)
include(modules/phpCgiModule/phpCgiModule.cmake)
include(modules/httpWriteResponse/httpWriteResponse.cmake)
include(modules/httpDelete/httpDelete.cmake)
include(modules/httpPut/httpPut.cmake)
include(modules/sslDecrypt/sslDecrypt.cmake)
include(modules/sslEncrypt/sslEncrypt.cmake)
## Conan basic setup changes the output directory to /lib ? strange, to fix
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
#conan_basic_setup(SecureConnectionModule)
#include(modules/SecureConnectionModule/SecureConnectionModule.cmake)
## Zia config file
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.conf ./config.conf COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/modules/SecureConnectionModule/ssl/mycert.pem ./mycert.pem COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/modules/SecureConnectionModule/ssl/mykey.pem ./mykey.pem COPYONLY)