forked from johanekholm/hex-game
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
141 lines (127 loc) · 3.22 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
PROJECT( HexGame )
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
SET(PRODUCT_NAME HexGame)
SET( SOURCES
Classes/AbstractResourceLoader.cpp
Classes/Action.cpp
Classes/BaseUnitViewController.cpp
Classes/CentralControl.cpp
Classes/EventManager.cpp
Classes/GameImage.cpp
Classes/geometry.cpp
Classes/HexMap.cpp
Classes/HexMapModel.cpp
Classes/InputManager.cpp
Classes/Item.cpp
Classes/jsoncpp.cpp
Classes/MapObject.cpp
Classes/MapObjectView.cpp
Classes/MenuView.cpp
Classes/MessageView.cpp
Classes/ModelManager.cpp
Classes/Observable.cpp
Classes/SceneLoader.cpp
Classes/ScriptManager.cpp
Classes/ShapeImage.cpp
Classes/Sound.cpp
Classes/StateManager.cpp
Classes/StringImage.cpp
Classes/TextureCatalog.cpp
Classes/TextureMap.cpp
Classes/TransitionViewController.cpp
Classes/UnitFactory.cpp
Classes/UnitModel.cpp
Classes/UnitView.cpp
Classes/ViewControllerManager.cpp
Classes/ViewController.cpp
Toolkit/toolkit.cpp
)
SET( HEADERS
Classes/AbstractResourceLoader.h
Classes/Action.h
Classes/BaseUnitViewController.h
Classes/CentralControl.h
Classes/ControlCallback.h
Classes/EventManager.h
Classes/GameImage.h
Classes/geometry.h
Classes/HexMap.h
Classes/HexMapModel.h
Classes/InputManager.h
Classes/Item.h
Classes/IObserver.h
Classes/json.h
Classes/json-forwards.h
Classes/MapObject.h
Classes/MapObjectView.h
Classes/MenuView.h
Classes/MessageView.h
Classes/ModelManager.h
Classes/SceneLoader.h
Classes/ScriptManager.h
Classes/ShapeImage.h
Classes/Sound.h
Classes/StateManager.h
Classes/StringImage.h
Classes/TextureCatalog.h
Classes/TextureMap.h
Classes/TransitionViewController.h
Classes/UnitFactory.h
Classes/UnitModel.h
Classes/UnitView.h
Classes/ViewControllerManager.h
Classes/ViewController.h
Classes/Observable.h
Toolkit/toolkit.h
)
SET(RESOURCES
Resources/actions.png
Resources/floortilemap.png
Resources/font_1.png
Resources/game_objects.png
Resources/texmap.png
Resources/texmap_hex.png
Resources/icons.png
)
SET(SOUNDS
Resources/fireball1.mp3
Resources/slash1.mp3
Resources/grotta.mp3
)
INCLUDE_DIRECTORIES( Toolkit )
INCLUDE_DIRECTORIES( Classes )
SET(TARGET_PLATFORM "" CACHE STRING "Sets the target platform. Valid values are 'iOS', 'Android' or 'Meego'")
IF (NOT TARGET_PLATFORM)
MESSAGE(FATAL_ERROR "Please set the target platform with -DTARGET_PLATFORM='platform'")
ELSE (NOT TARGET_PLATFORM)
STRING(TOUPPER ${TARGET_PLATFORM} UPLATFORM)
ADD_DEFINITIONS( -DPLATFORM_${UPLATFORM} )
INCLUDE( ${TARGET_PLATFORM}/rules.cmake NO_POLICY_SCOPE )
IF (COMMAND CONFIGURE)
CONFIGURE()
ENDIF(COMMAND CONFIGURE)
ENDIF(NOT TARGET_PLATFORM)
ADD_SUBDIRECTORY( lua )
IF (${TARGET_PLATFORM} MATCHES "Android")
ADD_LIBRARY(HexGame SHARED
${SOURCES}
${HEADERS}
${RESOURCES}
${SOUNDS}
)
ELSE ()
ADD_EXECUTABLE(HexGame MACOSX_BUNDLE
${SOURCES}
${HEADERS}
${RESOURCES}
${SOUNDS}
)
ENDIF ()
SET_SOURCE_FILES_PROPERTIES(${RESOURCES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
IF (COMMAND COMPILE)
COMPILE(HexGame)
ENDIF(COMMAND COMPILE)
TARGET_LINK_LIBRARIES( HexGame ${LIBRARIES} lua )