forked from azadkuh/qhttp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
59 lines (48 loc) · 1.55 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
cmake_minimum_required(VERSION 3.5)
project(qhttp LANGUAGES CXX C)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(QHTTP_DIR .)
set(QHTTP_SRC_DIR ${QHTTP_DIR}/src)
set(QHTTP_INC_DIR ${QHTTP_DIR}/include)
set(QHTTP_INC_DIR_2 ${QHTTP_INC_DIR}/qhttp)
set(CMAKE_INCLUDE_PATH
${QHTTP_DIR}
${QHTTP_SRC_DIR}
${QHTTP_INC_DIR}
${QHTTP_INC_DIR_2}
${QHTTP_DIR}/3rdparty)
include_directories(
${QHTTP_DIR}
${QHTTP_SRC_DIR}
${QHTTP_INC_DIR}
${QHTTP_INC_DIR_2}
${QHTTP_DIR}/3rdparty)
set(SOURCES
# Joyent http_parser
${QHTTP_DIR}/3rdparty/http-parser/http_parser.c
${QHTTP_SRC_DIR}/qhttpabstracts.cpp
${QHTTP_SRC_DIR}/qhttpserverconnection.cpp
${QHTTP_SRC_DIR}/qhttpserverrequest.cpp
${QHTTP_SRC_DIR}/qhttpserverresponse.cpp
${QHTTP_SRC_DIR}/qhttpserver.cpp
${QHTTP_SRC_DIR}/qhttpsslsocket.cpp
)
set(HEADERS
${QHTTP_DIR}/3rdparty/http-parser/http_parser.h
${QHTTP_INC_DIR_2}/qhttpfwd.hpp
${QHTTP_INC_DIR_2}/qhttpabstracts.hpp
${QHTTP_INC_DIR_2}/qhttpheaders.hpp
${QHTTP_INC_DIR_2}/qhttpserverconnection.hpp
${QHTTP_INC_DIR_2}/qhttpserverrequest.hpp
${QHTTP_INC_DIR_2}/qhttpserverresponse.hpp
${QHTTP_INC_DIR_2}/qhttpserver.hpp
${QHTTP_INC_DIR_2}/qhttpsslsocket.hpp
)
find_package(Qt5 COMPONENTS Network WebSockets REQUIRED)
add_library(qhttp SHARED ${SOURCES} ${HEADERS})
target_link_libraries(qhttp Qt5::Core Qt5::Network Qt5::WebSockets )