This repository has been archived by the owner on Jun 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
85 lines (73 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
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
cmake_minimum_required (VERSION 3.2)
project (GameServer VERSION 0.1 LANGUAGES CXX)
add_subdirectory(lib/TcpServer/TcpServer)
add_subdirectory(test)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "-Wall -pedantic")
#set(LUA_INCLUDE_DIR "/usr/include/luajit-2.0")
#set(LUA_LIB "luajit-5.1")
set(LUA_INCLUDE_DIR "/usr/include/lua5.3")
set(LUA_LIB "lua5.3")
find_package(Threads REQUIRED)
find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})
include_directories(src)
# put all .cpp and .h files into the sources variable
set(sources
src/Bot.cpp
src/Bot.h
src/BotThreadPool.cpp
src/BotThreadPool.h
src/config.h
src/debug_funcs.h
src/Field.cpp
src/Field.h
src/Food.cpp
src/Food.h
src/Game.cpp
src/Game.h
src/GUIDGenerator.cpp
src/GUIDGenerator.h
src/IdentifyableObject.cpp
src/IdentifyableObject.h
src/PositionObject.h
src/main.cpp
src/MsgPackProtocol.h
src/MsgPackUpdateTracker.cpp
src/MsgPackUpdateTracker.h
src/Semaphore.h
src/Snake.cpp
src/Snake.h
src/SpatialMap.h
src/types.h
src/UpdateTracker.h
src/Environment.h
src/Database.h src/Database.cpp
src/lua/LuaBot.cpp
src/lua/LuaBot.h
src/lua/LuaSelfInfo.h src/lua/LuaSelfInfo.cpp
src/lua/LuaSegmentInfo.h src/lua/LuaSegmentInfo.cpp
src/lua/LuaFoodInfo.h src/lua/LuaFoodInfo.cpp
src/lua/PoolAllocator.cpp
src/lua/PoolAllocator.h
)
include_directories(
${CMAKE_PROJECT_NAME}
lib/msgpack-c/include/
lib/TcpServer/TcpServer/include/
lib/sol2
${LUA_INCLUDE_DIR}
)
add_executable(
${CMAKE_PROJECT_NAME}
${sources}
)
target_link_libraries(
${CMAKE_PROJECT_NAME}
tcpserver
${LUA_LIB}
Threads::Threads
mysqlcppconn
)
configure_file("lua/demobot.lua" "lua/demobot.lua" COPYONLY)
configure_file("lua/quota.lua" "lua/quota.lua" COPYONLY)