-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
35 lines (25 loc) · 888 Bytes
/
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
CMAKE_MINIMUM_REQUIRED(VERSION 2.9)
project(web_server)
add_executable(web_server src/main.c)
add_subdirectory(http)
add_subdirectory(config_parser)
add_subdirectory(third_party/URLDecode)
add_subdirectory(script_executor)
list(APPEND EXTRA_LIBS http config_parser URLDecode script_executor)
find_library(EV_LIBRARY
NAMES libev ev evlib libev_static
PATHS /usr/local/lib
/usr/lib
${PROJECT_BINARY_DIR}/lib
${CMAKE_CURRENT_SOURCE_DIR}/libev
${CMAKE_CURRENT_SOURCE_DIR}/third_party/libev
)
if (EV_LIBRARY)
message(${EV_LIBRARY})
list(APPEND EXTRA_LIBS ${EV_LIBRARY})
endif()
include_directories(/usr/local/include http config_parser script_executor)
target_link_libraries(web_server PUBLIC ${EXTRA_LIBS})
target_include_directories(web_server PUBLIC
"${PROJECT_BINARY_DIR}"
)