-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
43 lines (35 loc) · 1.71 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
cmake_minimum_required(VERSION 3.6)
project(mrpc)
add_definitions(-DASIO_STANDALONE -DRPC_USE_LOG -D_LOG_CONSOLE)
if(CMAKE_HOST_WIN32)
add_definitions(-D_WIN32_WINNT=0x0701 -DNTDDI_VERSION=NTDDI_WIN7 )
add_definitions(/std:c++17 /utf-8)
else()
add_definitions(-g -O0 -Wall -std=c++2a)
endif()
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_HOME_DIRECTORY}/bin/)
set(RPC_INCLUDE_DIR ${CMAKE_HOME_DIRECTORY}/include/)
set(ASIO_INCLUDE_DIR ${CMAKE_HOME_DIRECTORY}/third/asio-1.18.1/include/)
set(SPDLOG_INCLUDE_DIR ${CMAKE_HOME_DIRECTORY}/third/spdlog/include/)
set(WLOG_INCLUDE_DIR ${CMAKE_HOME_DIRECTORY}/third/wlog/include/)
set(NLOHMANN_INCLUDE_DIR ${CMAKE_HOME_DIRECTORY}/third/nlohmann/include/)
message(VERBOSE "rpc directory: " ${RPC_INCLUDE_DIR})
message(VERBOSE "asio directory: " ${ASIO_INCLUDE_DIR})
message(VERBOSE "spdlog directory: " ${SPDLOG_INCLUDE_DIR})
message(VERBOSE "wlog directory: " ${WLOG_INCLUDE_DIR})
message(VERBOSE "nlohmann directory: " ${NLOHMANN_INCLUDE_DIR})
include_directories(
${RPC_INCLUDE_DIR}
${ASIO_INCLUDE_DIR}
${SPDLOG_INCLUDE_DIR}
${WLOG_INCLUDE_DIR}
${NLOHMANN_INCLUDE_DIR}
)
# add_subdirectory(${CMAKE_HOME_DIRECTORY}/example/test_004)
add_subdirectory(${CMAKE_HOME_DIRECTORY}/example/test_005)
add_subdirectory(${CMAKE_HOME_DIRECTORY}/example/test_100)
# add_subdirectory(${CMAKE_HOME_DIRECTORY}/example/test_101)
# add_subdirectory(${CMAKE_HOME_DIRECTORY}/example/test_102)
# add_subdirectory(${CMAKE_HOME_DIRECTORY}/example/test_103)
add_subdirectory(${CMAKE_HOME_DIRECTORY}/example/test_104)
add_subdirectory(${CMAKE_HOME_DIRECTORY}/example/test_201)