forked from dotmos/glider-pro-windows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
181 lines (174 loc) · 4.04 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message(FATAL_ERROR "In-tree builds are not recommended. Create a separate build directory.")
endif()
cmake_minimum_required(VERSION 3.16)
project(gliderpro)
if(NOT WIN32)
message(FATAL_ERROR "This program must be compiled for Windows")
endif()
# remove the annoying copyright banner when the resource compiler runs
set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} /nologo")
# disable the built-in manifest generation; we provide our own
if(MSVC)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /manifest:no")
endif()
# enable utf-8 support for source files
if(MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8")
endif()
add_executable(gliderpro)
set_target_properties(
gliderpro PROPERTIES
WIN32_EXECUTABLE TRUE
)
target_include_directories(gliderpro PRIVATE Headers miniz)
target_link_libraries(gliderpro comctl32 dsound dxguid msimg32 shlwapi winmm)
target_sources(
gliderpro PRIVATE
# miniz source files
miniz/miniz.h
miniz/miniz.c
# Glider PRO source files
Headers/About.h
Headers/Audio.h
Headers/Banner.h
Headers/ByteIO.h
Headers/ColorUtils.h
Headers/Coordinates.h
Headers/DialogUtils.h
Headers/DynamicMaps.h
Headers/Dynamics.h
Headers/Environ.h
Headers/Events.h
Headers/FileError.h
Headers/FrameTimer.h
Headers/GameOver.h
Headers/GliderDefines.h
Headers/GliderStructs.h
Headers/Grease.h
Headers/HighScores.h
Headers/House.h
Headers/HouseIO.h
Headers/HouseInfo.h
Headers/HouseLegal.h
Headers/ImageIO.h
Headers/Input.h
Headers/Interactions.h
Headers/InterfaceInit.h
Headers/Link.h
Headers/Macintosh.h
Headers/MacTypes.h
Headers/Main.h
Headers/MainWindow.h
Headers/Map.h
Headers/Marquee.h
Headers/Menu.h
Headers/Modes.h
Headers/Music.h
Headers/ObjectAdd.h
Headers/ObjectDraw.h
Headers/ObjectDrawAll.h
Headers/ObjectEdit.h
Headers/ObjectInfo.h
Headers/ObjectRects.h
Headers/Objects.h
Headers/Play.h
Headers/Player.h
Headers/Prefs.h
Headers/RectUtils.h
Headers/Render.h
Headers/ResourceIDs.h
Headers/ResourceLoader.h
Headers/Room.h
Headers/RoomGraphics.h
Headers/RoomInfo.h
Headers/RubberBands.h
Headers/SavedGames.h
Headers/Scoreboard.h
Headers/Scrap.h
Headers/SelectHouse.h
Headers/Settings.h
Headers/Sound.h
Headers/StringUtils.h
Headers/StructIO.h
Headers/StructuresInit.h
Headers/Tools.h
Headers/Transit.h
Headers/Transitions.h
Headers/Triggers.h
Headers/Trip.h
Headers/Utilities.h
Headers/WinAPI.h
Headers/WindowUtils.h
Resources/gliderpro.rc
Sources/About.c
Sources/Audio.c
Sources/Banner.c
Sources/ByteIO.c
Sources/ColorUtils.c
Sources/Coordinates.c
Sources/DialogUtils.c
Sources/DynamicMaps.c
Sources/Dynamics.c
Sources/Environ.c
Sources/Events.c
Sources/FileError.c
Sources/FrameTimer.c
Sources/GameOver.c
Sources/Grease.c
Sources/HighScores.c
Sources/House.c
Sources/HouseInfo.c
Sources/HouseIO.c
Sources/HouseLegal.c
Sources/ImageIO.c
Sources/Input.c
Sources/Interactions.c
Sources/InterfaceInit.c
Sources/Link.c
Sources/Macintosh.c
Sources/Main.c
Sources/MainWindow.c
Sources/Map.c
Sources/Marquee.c
Sources/Menu.c
Sources/Modes.c
Sources/Music.c
Sources/ObjectAdd.c
Sources/ObjectDraw.c
Sources/ObjectDrawAll.c
Sources/ObjectEdit.c
Sources/ObjectInfo.c
Sources/ObjectRects.c
Sources/Objects.c
Sources/Play.c
Sources/Player.c
Sources/Prefs.c
Sources/RectUtils.c
Sources/Render.c
Sources/ResourceLoader.c
Sources/Room.c
Sources/RoomGraphics.c
Sources/RoomInfo.c
Sources/RubberBands.c
Sources/SavedGames.c
Sources/Scoreboard.c
Sources/Scrap.c
Sources/SelectHouse.c
Sources/Settings.c
Sources/Sound.c
Sources/StringUtils.c
Sources/StructIO.c
Sources/StructuresInit.c
Sources/Tools.c
Sources/Transit.c
Sources/Transitions.c
Sources/Triggers.c
Sources/Trip.c
Sources/Utilities.c
Sources/WindowUtils.c
# Generated zipped game resources
Mermaid.dat
)
# Script that sets up the generation of the Mermaid.dat file
include("${CMAKE_SOURCE_DIR}/Resources/Mermaid.cmake")