forked from NingLeixueR/ngl_server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
122 lines (108 loc) · 4.97 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
cmake_minimum_required(VERSION 2.8)
PROJECT (ngl)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
set(CMAKE_CXX_STANDARD 20)
IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
set(CMAKE_CXX_FLAGS "${COLLECT_GCC} -std=c++20 -march=native -msse4.1 -O3 -lrt -L/usr/lib64/mysql/ -lmysqlclient -lcurl -lcryptopp -L`pwd`/../../../lib -I/usr/include/mysql -I/usr/include/curl")
INCLUDE_DIRECTORIES(3part/boost/libs/atomic/src)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux")
IF (CMAKE_SYSTEM_NAME MATCHES "Windows")
SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
ENDIF (CMAKE_SYSTEM_NAME MATCHES "Windows")
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/lib)
INCLUDE_DIRECTORIES(/)
INCLUDE_DIRECTORIES(3part)
INCLUDE_DIRECTORIES(3part/boost)
INCLUDE_DIRECTORIES(3part/boost/boost)
INCLUDE_DIRECTORIES(3part/curl/)
INCLUDE_DIRECTORIES(3part/curl/include/curl)
INCLUDE_DIRECTORIES(3part/curl/include)
INCLUDE_DIRECTORIES(3part/curl/include)
INCLUDE_DIRECTORIES(3part/curl/openssl)
INCLUDE_DIRECTORIES(3part/mysql/)
INCLUDE_DIRECTORIES(3part/mysql/include)
INCLUDE_DIRECTORIES(3part/protobuf/include)
INCLUDE_DIRECTORIES(3part/protobuf/include/google)
INCLUDE_DIRECTORIES(public/)
INCLUDE_DIRECTORIES(public/cpp)
INCLUDE_DIRECTORIES(public/cpp/net/)
INCLUDE_DIRECTORIES(public/cpp/net/tcp)
INCLUDE_DIRECTORIES(public/cpp/net/udp)
INCLUDE_DIRECTORIES(public/cpp/net/udp/asio_kcp)
INCLUDE_DIRECTORIES(public/cpp/net/udp/kcp)
INCLUDE_DIRECTORIES(public/cpp/protocol/)
INCLUDE_DIRECTORIES(public/cpp/protocol/protocol/)
INCLUDE_DIRECTORIES(public/cpp/protocol/protobuf/)
INCLUDE_DIRECTORIES(public/cpp/protocol/protobuf/lua)
INCLUDE_DIRECTORIES(public/cpp/actor/)
INCLUDE_DIRECTORIES(public/cpp/actor/actor_base)
INCLUDE_DIRECTORIES(public/cpp/actor/actor_logic)
INCLUDE_DIRECTORIES(public/cpp/actor/actor_logic/game/)
INCLUDE_DIRECTORIES(public/cpp/actor/actor_logic/gateway/)
INCLUDE_DIRECTORIES(public/cpp/actor/actor_logic/login/)
INCLUDE_DIRECTORIES(public/cpp/actor/actor_logic/robot/)
INCLUDE_DIRECTORIES(public/cpp/actor/actor_logic/world)
INCLUDE_DIRECTORIES(public/cpp/actor/actor_logic/log)
INCLUDE_DIRECTORIES(public/cpp/actor/actor_logic/cross)
INCLUDE_DIRECTORIES(public/cpp/actor/actor_logic/reloadcsv)
INCLUDE_DIRECTORIES(public/cpp/tools/)
INCLUDE_DIRECTORIES(public/cpp/tools/serialize/)
INCLUDE_DIRECTORIES(public/cpp/tools/tab/)
INCLUDE_DIRECTORIES(public/cpp/tools/tab/csv/)
INCLUDE_DIRECTORIES(public/cpp/tools/tab/csv/protocol)
INCLUDE_DIRECTORIES(public/cpp/tools/tab/xml/)
INCLUDE_DIRECTORIES(public/cpp/tools/tab/json/)
INCLUDE_DIRECTORIES(public/cpp/tools/db/)
INCLUDE_DIRECTORIES(public/cpp/tools/db/mysql/)
INCLUDE_DIRECTORIES(public/cpp/tools/db/redis/)
INCLUDE_DIRECTORIES(public/cpp/tools/dmp/)
INCLUDE_DIRECTORIES(public/cpp/tools/curl/)
INCLUDE_DIRECTORIES(public/cpp/tools/log/)
INCLUDE_DIRECTORIES(public/cpp/tools/luatools/)
INCLUDE_DIRECTORIES(public/cpp/tools/notify/)
INCLUDE_DIRECTORIES(public/cpp/logic/)
INCLUDE_DIRECTORIES(public/cpp/logic/public)
INCLUDE_DIRECTORIES(public/cpp/logic/public/role)
INCLUDE_DIRECTORIES(public/cpp/logic/public/role/attribute)
INCLUDE_DIRECTORIES(public/cpp/logic/public/role/bag)
INCLUDE_DIRECTORIES(public/cpp/logic/public/role/task)
INCLUDE_DIRECTORIES(public/cpp/logic/public/role/map)
INCLUDE_DIRECTORIES(public/cpp/logic/public/role/matching)
INCLUDE_DIRECTORIES(public/cpp/logic/public/role/plays)
INCLUDE_DIRECTORIES(public/cpp/logic/public/public)
INCLUDE_DIRECTORIES(public/cpp/logic/public/public/notice)
INCLUDE_DIRECTORIES(public/cpp/logic/public/public/gm)
INCLUDE_DIRECTORIES(public/cpp/logic/public/public/mail)
INCLUDE_DIRECTORIES(public/cpp/logic/public/public/chat)
INCLUDE_DIRECTORIES(public/cpp/logic/public/public/activity)
INCLUDE_DIRECTORIES(public/cpp/logic/public/public/activity/real_activity)
INCLUDE_DIRECTORIES(public/cpp/logic/public/public/ranklist)
INCLUDE_DIRECTORIES(public/cpp/logic/public/public/brief)
INCLUDE_DIRECTORIES(public/cpp/logic/public/public/calendar)
INCLUDE_DIRECTORIES(public/cpp/logic/public/template_tab)
INCLUDE_DIRECTORIES(public/cpp/logic/tools)
ADD_DEFINITIONS(-DASIO_STANDALONE)
ADD_DEFINITIONS(-DASIO_NO_DEPRECATED)
IF (CMAKE_SYSTEM_NAME MATCHES "Windows")
ADD_DEFINITIONS(-DBOOST_ALL_NO_LIB)
ADD_DEFINITIONS(-DBOOST_THREAD_BUILD_DLL)
ADD_DEFINITIONS(-DBUILDING_LIBCURL)
ADD_DEFINITIONS(-DHTTP_ONLY)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
ENDIF (CMAKE_SYSTEM_NAME MATCHES "Windows")
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
ADD_DEFINITIONS(-DBOOST_HAS_PTHREADS)
ADD_DEFINITIONS(-DBOOST_SP_USE_PTHREADS)
ADD_DEFINITIONS(-DBOOST_AC_USE_PTHREADS)
ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux")
IF (CMAKE_SYSTEM_NAME MATCHES "Windows")
LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/lib/Debug)
ENDIF (CMAKE_SYSTEM_NAME MATCHES "Windows")
IF (CMAKE_SYSTEM_NAME MATCHES "Windows")
add_subdirectory(3part)
add_subdirectory(public)
ENDIF (CMAKE_SYSTEM_NAME MATCHES "Windows")
add_subdirectory(server)