-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathCMakeLists.txt
50 lines (42 loc) · 1.17 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
cmake_minimum_required(VERSION 3.4.1)
project(aps)
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
set(LINUX TRUE)
endif()
# Flags
set(CMAKE_CXX_STANDARD 11)
set(CXX_STANDARD_REQUIRED ON)
if (WIN32)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()
# Definitions
add_definitions(-DASIO_STANDALONE)
add_definitions(-DASIO_NO_TYPEID)
if (WIN32)
add_definitions(-D_WIN32_WINNT=0x0600) # Windows Vista +
add_definitions(-DINCL_EXTRA_HTON_FUNCTIONS)
endif()
# Include paths
include_directories(
src
third-party
third-party/asio/include
)
# aps-demo
if ((NOT DEFINED BUILD_APS_DEMO) OR (BUILD_APS_DEMO STREQUAL "")
OR (${BUILD_APS_DEMO} MATCHES "(FALSE|false|0|OFF)"))
option(BUILD_APS_DEMO "Build the aps demo" OFF)
elseif(${BUILD_APS_DEMO} MATCHES "(TRUE|true|1|null|ON)")
option(BUILD_APS_DEMO "Build the aps demo" ON)
else()
message(FATAL_ERROR "INVALID FLAG BUILD_APS_DEMO=" ${BUILD_APS_DEMO})
endif()
if (BUILD_APS_DEMO)
add_subdirectory(demo)
endif()
# srouce
add_subdirectory(src)
# third-party
add_subdirectory(third-party)