-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathCMakeLists.txt
271 lines (206 loc) · 6.46 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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
#############################
#
# VGM Tools CMake build file
#
#############################
cmake_minimum_required (VERSION 3.2)
project (VGMTools LANGUAGES C CXX)
find_package(ZLIB REQUIRED)
add_executable(dacopt
dacopt.c
)
install(TARGETS dacopt RUNTIME DESTINATION "bin")
add_executable(dro2vgm
dro2vgm.c
)
install(TARGETS dro2vgm RUNTIME DESTINATION "bin")
add_executable(imf2vgm
imf2vgm.c
)
install(TARGETS imf2vgm RUNTIME DESTINATION "bin")
add_executable(opl_23
opl_23.c
)
target_include_directories(opl_23 PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(opl_23 ${ZLIB_LIBRARIES})
install(TARGETS opl_23 RUNTIME DESTINATION "bin")
add_executable(opt_oki
opt_oki.c
)
target_include_directories(opt_oki PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(opt_oki ${ZLIB_LIBRARIES})
install(TARGETS opt_oki RUNTIME DESTINATION "bin")
add_executable(optvgm
optvgm.cpp
pcm_optimizer.cpp
)
target_include_directories(optvgm PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(optvgm ${ZLIB_LIBRARIES})
install(TARGETS optvgm RUNTIME DESTINATION "bin")
add_executable(optvgmrf
optvgmrf.c
)
target_include_directories(optvgmrf PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(optvgmrf ${ZLIB_LIBRARIES})
install(TARGETS optvgmrf RUNTIME DESTINATION "bin")
add_executable(raw2vgm
raw2vgm.c
)
install(TARGETS raw2vgm RUNTIME DESTINATION "bin")
add_executable(vgm2txt
vgm2txt.c
chiptext.c
)
target_include_directories(vgm2txt PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(vgm2txt ${ZLIB_LIBRARIES})
if(NOT MSVC)
target_link_libraries(vgm2txt -lm)
endif()
install(TARGETS vgm2txt RUNTIME DESTINATION "bin")
add_executable(vgm_cmp
vgm_cmp.c
chip_cmp.c
)
target_include_directories(vgm_cmp PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(vgm_cmp ${ZLIB_LIBRARIES})
install(TARGETS vgm_cmp RUNTIME DESTINATION "bin")
add_executable(vgm_cnt
vgm_cnt.c
)
target_include_directories(vgm_cnt PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(vgm_cnt ${ZLIB_LIBRARIES})
if(NOT MSVC)
target_link_libraries(vgm_cnt -lm)
endif()
install(TARGETS vgm_cnt RUNTIME DESTINATION "bin")
add_executable(vgm_dbc
vgm_dbc.c
)
target_include_directories(vgm_dbc PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(vgm_dbc ${ZLIB_LIBRARIES})
install(TARGETS vgm_dbc RUNTIME DESTINATION "bin")
add_executable(vgm_dso
vgm_dso.c
)
target_include_directories(vgm_dso PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(vgm_dso ${ZLIB_LIBRARIES})
install(TARGETS vgm_dso RUNTIME DESTINATION "bin")
add_executable(vgm_facc
vgm_facc.c
)
target_include_directories(vgm_facc PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(vgm_facc ${ZLIB_LIBRARIES})
install(TARGETS vgm_facc RUNTIME DESTINATION "bin")
add_executable(vgm_mono
vgm_mono.c
)
target_include_directories(vgm_mono PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(vgm_mono ${ZLIB_LIBRARIES})
install(TARGETS vgm_mono RUNTIME DESTINATION "bin")
add_executable(vgm_ndlz
vgm_ndlz.c
)
target_include_directories(vgm_ndlz PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(vgm_ndlz ${ZLIB_LIBRARIES})
install(TARGETS vgm_ndlz RUNTIME DESTINATION "bin")
add_executable(vgm_ptch
vgm_ptch.c
chip_strp.c
)
target_include_directories(vgm_ptch PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(vgm_ptch ${ZLIB_LIBRARIES})
if(NOT MSVC)
target_link_libraries(vgm_ptch -lm)
endif()
install(TARGETS vgm_ptch RUNTIME DESTINATION "bin")
add_executable(vgm_ren
vgm_ren.c
)
target_include_directories(vgm_ren PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(vgm_ren ${ZLIB_LIBRARIES})
install(TARGETS vgm_ren RUNTIME DESTINATION "bin")
add_executable(vgm_smp1
vgm_smp1.c
)
target_include_directories(vgm_smp1 PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(vgm_smp1 ${ZLIB_LIBRARIES})
install(TARGETS vgm_smp1 RUNTIME DESTINATION "bin")
add_executable(vgm_sptd
vgm_sptd.c
vgm_trml.c
)
target_include_directories(vgm_sptd PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(vgm_sptd ${ZLIB_LIBRARIES})
install(TARGETS vgm_sptd RUNTIME DESTINATION "bin")
add_executable(vgm_spts
vgm_spts.c
vgm_trml.c
)
target_include_directories(vgm_spts PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(vgm_spts ${ZLIB_LIBRARIES})
install(TARGETS vgm_spts RUNTIME DESTINATION "bin")
add_executable(vgm_sro
vgm_sro.c
chip_srom.c
)
target_include_directories(vgm_sro PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(vgm_sro ${ZLIB_LIBRARIES})
install(TARGETS vgm_sro RUNTIME DESTINATION "bin")
add_executable(vgm_stat
vgm_stat.c
)
target_include_directories(vgm_stat PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(vgm_stat ${ZLIB_LIBRARIES})
install(TARGETS vgm_stat RUNTIME DESTINATION "bin")
add_executable(vgm_tag
vgm_tag.c
)
target_include_directories(vgm_tag PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(vgm_tag ${ZLIB_LIBRARIES})
install(TARGETS vgm_tag RUNTIME DESTINATION "bin")
add_executable(vgm_trim
vgm_trim.c
vgm_trml.c
)
target_include_directories(vgm_trim PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(vgm_trim ${ZLIB_LIBRARIES})
install(TARGETS vgm_trim RUNTIME DESTINATION "bin")
add_executable(vgm_tt
vgm_tt.cpp
)
target_include_directories(vgm_tt PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(vgm_tt ${ZLIB_LIBRARIES})
install(TARGETS vgm_tt RUNTIME DESTINATION "bin")
add_executable(vgm_vol
vgm_vol.c
)
if(NOT MSVC)
target_link_libraries(vgm_vol -lm)
endif()
install(TARGETS vgm_vol RUNTIME DESTINATION "bin")
add_executable(vgmlpfnd
vgmlpfnd.c
)
target_include_directories(vgmlpfnd PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(vgmlpfnd ${ZLIB_LIBRARIES})
install(TARGETS vgmlpfnd RUNTIME DESTINATION "bin")
add_executable(vgmmerge
vgmmerge.c
)
target_include_directories(vgmmerge PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(vgmmerge ${ZLIB_LIBRARIES})
install(TARGETS vgmmerge RUNTIME DESTINATION "bin")
# extra tools not compiled by default, because they are
# either in beta state or not of use/shouldn't be used without special knowledge
add_executable(optdac EXCLUDE_FROM_ALL
optdac.c
)
target_include_directories(optdac PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(optdac ${ZLIB_LIBRARIES})
install(TARGETS optdac RUNTIME DESTINATION "bin" OPTIONAL)
add_executable(optvgm32 EXCLUDE_FROM_ALL
optvgm32.c
)
target_include_directories(optvgm32 PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(optvgm32 ${ZLIB_LIBRARIES})
install(TARGETS optvgm32 RUNTIME DESTINATION "bin" OPTIONAL)