-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
144 lines (131 loc) · 4.11 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
cmake_minimum_required(VERSION 3.14.2)
project(IsoMap)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}")
find_package(OpenGL REQUIRED)
#set( USE_GLUT )
set(USE_SDL ON)
if (MINGW)
elseif (USE_GLUT)
find_package(GLUT REQUIRED)
elseif (USE_SDL)
find_package(SDL REQUIRED)
endif ()
set(VL_BASE_COMPONENTS VLMain VLX VLGraphics VLCore VLVG VLVolume VLMolecule FreeType JPG PNG TIFF ZLib)
if (MINGW)
find_package(VL COMPONENTS ${VL_BASE_COMPONENTS} VLWin32 REQUIRED)
elseif (USE_GLUT)
find_package(VL COMPONENTS ${VL_BASE_COMPONENTS} VLGLUT REQUIRED)
elseif (USE_SDL)
find_package(VL COMPONENTS ${VL_BASE_COMPONENTS} VLSDL REQUIRED)
endif ()
add_definitions(-DVL_STATIC_LINKING)
# add VL include directories
include_directories(${VL_INCLUDE_DIRS})
if (MINGW)
set(PLATFORM_ENTRY win32_main.cpp)
elseif (USE_GLUT)
include_directories(${GLUT_INCLUDE_DIR})
set(PLATFORM_ENTRY glut_main.cpp)
elseif (USE_SDL)
include_directories(${SDL_INCLUDE_DIR})
set(PLATFORM_ENTRY sdl_main.cpp)
endif ()
add_executable(
IsoMap
${PLATFORM_ENTRY}
MainWindow.cpp
MainWindow.h
MouseListener.cpp
MouseListener.h
client/types.h
client/Match.cpp
client/Match.h
client/ModelCache.cpp
client/ModelCache.h
client/Player.cpp
client/Player.h
client/Structure.cpp
client/Structure.h
client/Terrain.cpp
client/Terrain.h
client/Unit.cpp
client/Unit.h
client/match/Renderer.cpp
client/match/Renderer.h
client/player/AutonomousUnitsController.cpp
client/player/AutonomousUnitsController.h
client/player/Controller.cpp
client/player/Controller.h
client/player/ConstructionController.cpp
client/player/ConstructionController.h
client/player/Renderer.cpp
client/player/Renderer.h
client/structure/Controller.cpp
client/structure/Controller.h
client/structure/Renderer.cpp
client/structure/Renderer.h
client/terrain/Renderer.cpp
client/terrain/Renderer.h
client/unit/AdjacentToStructurePathCondition.h
client/unit/ConstructorController.cpp
client/unit/ConstructorController.h
client/unit/Controller.h
client/unit/Controller.cpp
client/unit/DockingTilePathCondition.h
client/unit/HarvesterController.cpp
client/unit/HarvesterController.h
client/unit/OreTilePathCondition.h
client/unit/PathCondition.h
client/unit/PositionPathCondition.h
client/unit/Renderer.cpp
client/unit/Renderer.h
client/unit/WayPointRetryPathCondition.h
client/unit/WorkProvider.h
common/types.h
common/FootPrint.cpp
common/FootPrint.h
common/MatchMessage.cpp
common/MatchMessage.h
common/PlayerMessage.cpp
common/PlayerMessage.h
common/StructureData.h
common/StructureMessage.cpp
common/StructureMessage.h
common/StructureType.cpp
common/StructureType.h
common/TerrainData.cpp
common/TerrainData.h
common/TerrainMessage.cpp
common/TerrainMessage.h
common/UnitData.h
common/UnitData.cpp
common/UnitMessage.cpp
common/UnitMessage.h
common/UnitType.cpp
common/UnitType.h
server/types.h
server/Match.cpp
server/Match.h
server/Object.cpp
server/Object.h
server/Player.cpp
server/Player.h
server/Structure.cpp
server/Structure.h
server/Terrain.cpp
server/Terrain.h
server/TerrainGenerator.cpp
server/TerrainGenerator.h
server/Unit.cpp
server/Unit.h
util/math.h
util/math.cpp
)
if (MINGW)
target_link_libraries(IsoMap ${VL_LIBRARIES} ${OPENGL_LIBRARIES} -static)
elseif (USE_GLUT)
target_link_libraries(IsoMap ${VL_LIBRARIES} ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
elseif (USE_SDL)
target_link_libraries(IsoMap ${VL_LIBRARIES} ${OPENGL_LIBRARIES} ${SDL_LIBRARY})
endif ()