-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
56 lines (35 loc) · 1.72 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
cmake_minimum_required(VERSION 3.13)
project (urnet VERSION 0.6 )
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused-function -g ")
elseif(UNIX)
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pthread -g -O2 -fPIC -Wno-unused-function ")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pthread -g -Wno-unused-function -fvisibility=hidden ")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pthread -g -static-libgcc -static-libstdc++ -Wl,-Bstatic -lc -Wl,-Bdynamic -Wno-unused-function -fvisibility=hidden ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pthread -g -Wno-unused-function -fvisibility=hidden ")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pthread -g -static-libgcc -static-libstdc++ -Wl,-Bstatic -lc -Wl,-Bdynamic -Wl,-rpath,bin -Wno-unused-function -fvisibility=hidden ")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-rpath ${CMAKE_CURRENT_SOURCE_DIR}/libs/ssl/lib/ ")
link_directories(libs/ssl/lib)
elseif(WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D NDEBUG")
endif()
include_directories(.)
include_directories(mods)
include_directories(include)
include_directories(utils)
include_directories(libs/)
add_subdirectory(opt/fmt-7.1.3 EXCLUDE_FROM_ALL)
add_subdirectory(opt/spdlog EXCLUDE_FROM_ALL)
include_directories(opt/fmt-7.1.3/include)
include_directories(opt/spdlog/include)
file(GLOB SRCS
src/server.cpp
)
add_executable(server ${SRCS} )
target_link_libraries(server uring fmt)
add_executable(web src/web.cpp)
target_link_libraries(web uring fmt )