-
Notifications
You must be signed in to change notification settings - Fork 12
/
CMakeLists.txt
644 lines (478 loc) · 17.9 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
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
cmake_minimum_required(VERSION 3.20)
set(name xx2d)
project(${name})
if (MSVC)
else()
if (${CMAKE_BUILD_TYPE} MATCHES "Rel*")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flto -ffat-lto-objects")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto -ffat-lto-objects")
endif()
endif()
option(XX2D_ENABLE_IMGUI "Enable imgui support" ON)
if (XX2D_ENABLE_IMGUI)
add_definitions("-DXX2D_ENABLE_IMGUI")
endif()
option(XX2D_ENABLE_MINIAUDIO "Enable miniaudio support" ON)
if (XX2D_ENABLE_MINIAUDIO)
add_definitions("-DXX2D_ENABLE_MINIAUDIO")
endif()
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
include_directories(
glad
stb
glfw/include
pugixml/src
imgui
imgui/backends
miniaudio
libvpx_prebuilt/includes
nameof/include
3rd
xxlib
src
)
set(SRCS)
file(GLOB SRCS #GLOB_RECURSE
glad/*.h
stb/*.h
glfw/include/GLFW/*.h
pugixml/src/*.hpp
miniaudio/*.h
nameof/include/*.hpp
3rd/*.*
xxlib/*.h
src/*.cpp
src/*.h
src/*.hpp
src/*.inc
)
add_library(${name} ${SRCS})
source_group("" FILES ${SRCS})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${SRCS})
if(MSVC) # vs2022+
# option(XX2D_ENABLE_STATIC_LINK "Enable static link" OFF)
# if (XX2D_ENABLE_STATIC_LINK)
# add_compile_options(
# $<$<CONFIG:MinSizeRel>:/MT>
# $<$<CONFIG:Release>:/MT>
# $<$<CONFIG:RelWithDebInfo>:/MT>
# )
# target_compile_options(${name}
# PRIVATE $<$<CONFIG:Release>:/MT>
# )
# endif()
# target_link_options(${name}
# PRIVATE $<$<CONFIG:MinSizeRel>:/LTCG>
# PRIVATE $<$<CONFIG:Release>:/LTCG>
# PRIVATE $<$<CONFIG:RelWithDebInfo>:/LTCG>
# )
target_link_options(${name} PUBLIC
$<$<CONFIG:Debug>:/NODEFAULTLIB:libcmtd.lib>
$<$<CONFIG:MinSizeRel>:/NODEFAULTLIB:libcmt.lib>
$<$<CONFIG:Release>:/NODEFAULTLIB:libcmt.lib>
$<$<CONFIG:RelWithDebInfo>:/NODEFAULTLIB:libcmt.lib>
)
set_source_files_properties(src/xx2d.cpp PROPERTIES COMPILE_FLAGS "/Ycxx2d.h")
target_compile_options(${name} PRIVATE $<$<PLATFORM_ID:Windows>:/Yuxx2d.h>)
target_compile_definitions(${name} PUBLIC
"$<$<CONFIG:MinSizeRel>:_SECURE_SCL=0>"
"$<$<CONFIG:MinSizeRel>:_HAS_ITERATOR_DEBUGGING=0>"
"$<$<CONFIG:Release>:_SECURE_SCL=0>"
"$<$<CONFIG:Release>:_HAS_ITERATOR_DEBUGGING=0>"
"$<$<CONFIG:RelWithDebInfo>:_SECURE_SCL=0>"
"$<$<CONFIG:RelWithDebInfo>:_HAS_ITERATOR_DEBUGGING=0>"
)
add_compile_options($<$<PLATFORM_ID:Windows>:/MP${Biogears_BUILD_PARALLEL_LEVEL}>) # other proj enable multi-processor compilation
target_compile_options(${name}
PRIVATE $<$<PLATFORM_ID:Windows>:/std:c17>
PRIVATE $<$<PLATFORM_ID:Windows>:/bigobj>
PRIVATE $<$<PLATFORM_ID:Windows>:/MP${Biogears_BUILD_PARALLEL_LEVEL}> # this proj enable multi-processor compilation
)
set_target_properties(${name} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
else()
target_precompile_headers(${name}
PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/src/xx2d.h>
)
target_compile_options(${name} PRIVATE -Wno-invalid-offsetof)
endif()
include_directories(
imgui/misc/cpp
)
set(SRCS)
file(GLOB SRCS #GLOB_RECURSE
imgui/misc/cpp/*.h
imgui/misc/cpp/*.cpp
)
add_library(imguicpp ${SRCS})
target_link_libraries(${name} imguicpp)
add_definitions(-DMAKE_LIB) # for lua
include_directories(
lua
)
set(SRCS)
file(GLOB SRCS #GLOB_RECURSE
lua/onelua.c
)
add_library(lua ${SRCS})
target_link_libraries(${name} lua)
SET(GLFW_BUILD_DOCS OFF CACHE BOOL "GLFW_BUILD_DOCS" FORCE)
SET(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "GLFW_BUILD_EXAMPLES" FORCE)
SET(GLFW_BUILD_TESTS OFF CACHE BOOL "GLFW_BUILD_TESTS" FORCE)
SET(GLFW_INSTALL OFF CACHE BOOL "GLFW_INSTALL" FORCE)
add_subdirectory(glfw)
add_subdirectory(imgui_cmake imgui)
add_subdirectory(pugixml)
SET(BUILD_TESTING OFF CACHE BOOL "BUILD_TESTING" FORCE)
SET(USE_MSVC_RUNTIME_LIBRARY_DLL OFF CACHE BOOL "USE_MSVC_RUNTIME_LIBRARY_DLL" FORCE)
SET(ZSTD_BUILD_PROGRAMS OFF CACHE BOOL "ZSTD_BUILD_PROGRAMS" FORCE)
SET(ZSTD_BUILD_SHARED OFF CACHE BOOL "ZSTD_BUILD_SHARED" FORCE)
SET(ZSTD_BUILD_TESTS OFF CACHE BOOL "ZSTD_BUILD_SHARED" FORCE)
SET(ZSTD_LEGACY_SUPPORT OFF CACHE BOOL "ZSTD_LEGACY_SUPPORT" FORCE)
add_subdirectory(zstd/build/cmake zstd)
include_directories(
zstd/lib
)
add_subdirectory(spine-runtimes/spine-cpp)
if(MSVC)
else()
target_compile_options(spine-cpp PRIVATE
-Wno-parentheses
-Wno-implicit-fallthrough
-Wno-type-limits
)
endif()
###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################
# examples
include_directories(
examples
spine-runtimes/spine-cpp/spine-cpp/include
)
set(SRCS)
file(GLOB SRCS #GLOB_RECURSE
examples/*.h
examples/*.hpp
examples/*.inc
examples/*.c
examples/*.cpp
)
add_executable(examples ${SRCS})
target_link_libraries(examples ${name} glfw imgui pugixml libzstd_static)
target_link_libraries(examples spine-cpp)
if(MSVC) # vs2022+
target_link_libraries(examples ${CMAKE_CURRENT_SOURCE_DIR}/libvpx_prebuilt/lib/windows/vpxmd.lib)
endif()
if(MSVC) # vs2022+
target_link_options(examples
PRIVATE $<$<CONFIG:MinSizeRel>:/LTCG>
PRIVATE $<$<CONFIG:Release>:/LTCG>
PRIVATE $<$<CONFIG:RelWithDebInfo>:/LTCG>
)
target_compile_options(examples
PRIVATE $<$<PLATFORM_ID:Windows>:/std:c17>
PRIVATE $<$<PLATFORM_ID:Windows>:/bigobj>
)
set_source_files_properties(examples/main.cpp PROPERTIES COMPILE_FLAGS "/Ycmain.h")
target_compile_options(examples PRIVATE $<$<PLATFORM_ID:Windows>:/Yumain.h>)
set_target_properties(examples PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
else()
target_precompile_headers(examples
PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/examples/main.h>
)
endif()
###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################
# tests
include_directories(
tests
spine-runtimes/spine-cpp/spine-cpp/include
)
set(SRCS)
file(GLOB SRCS #GLOB_RECURSE
tests/*.h
tests/*.hpp
tests/*.inc
tests/*.c
tests/*.cpp
)
add_executable(tests ${SRCS})
target_link_libraries(tests ${name} glfw imgui pugixml libzstd_static)
target_link_libraries(tests spine-cpp)
if(MSVC) # vs2022+
target_link_libraries(tests ${CMAKE_CURRENT_SOURCE_DIR}/libvpx_prebuilt/lib/windows/vpxmd.lib)
endif()
if(MSVC) # vs2022+
target_link_options(tests
PRIVATE $<$<CONFIG:MinSizeRel>:/LTCG>
PRIVATE $<$<CONFIG:Release>:/LTCG>
PRIVATE $<$<CONFIG:RelWithDebInfo>:/LTCG>
)
target_compile_options(tests
PRIVATE $<$<PLATFORM_ID:Windows>:/std:c17>
PRIVATE $<$<PLATFORM_ID:Windows>:/bigobj>
)
set_source_files_properties(tests/main.cpp PROPERTIES COMPILE_FLAGS "/Ycmain.h")
target_compile_options(tests PRIVATE $<$<PLATFORM_ID:Windows>:/Yumain.h>)
set_target_properties(tests PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
else()
target_precompile_headers(tests
PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/tests/main.h>
)
endif()
###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################
# tests2
include_directories(
tests2
spine-runtimes/spine-cpp/spine-cpp/include
)
set(SRCS)
file(GLOB SRCS #GLOB_RECURSE
tests2/*.h
tests2/*.hpp
tests2/*.inc
tests2/*.c
tests2/*.cpp
)
add_executable(tests2 ${SRCS})
target_link_libraries(tests2 ${name} glfw imgui pugixml libzstd_static)
target_link_libraries(tests2 spine-cpp)
if(MSVC) # vs2022+
target_link_libraries(tests2 ${CMAKE_CURRENT_SOURCE_DIR}/libvpx_prebuilt/lib/windows/vpxmd.lib)
endif()
if(MSVC) # vs2022+
target_link_options(tests2
PRIVATE $<$<CONFIG:MinSizeRel>:/LTCG>
PRIVATE $<$<CONFIG:Release>:/LTCG>
PRIVATE $<$<CONFIG:RelWithDebInfo>:/LTCG>
)
target_compile_options(tests2
PRIVATE $<$<PLATFORM_ID:Windows>:/std:c17>
PRIVATE $<$<PLATFORM_ID:Windows>:/bigobj>
)
set_source_files_properties(tests2/main.cpp PROPERTIES COMPILE_FLAGS "/Ycmain.h")
target_compile_options(tests2 PRIVATE $<$<PLATFORM_ID:Windows>:/Yumain.h>)
set_target_properties(tests2 PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
else()
target_precompile_headers(tests2
PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/tests2/main.h>
)
endif()
###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################
# tests3
include_directories(
tests3
spine-runtimes/spine-cpp/spine-cpp/include
)
set(SRCS)
file(GLOB SRCS #GLOB_RECURSE
tests3/*.h
tests3/*.hpp
tests3/*.inc
tests3/*.c
tests3/*.cpp
)
add_executable(tests3 ${SRCS})
target_link_libraries(tests3 ${name} glfw imgui pugixml libzstd_static)
target_link_libraries(tests3 spine-cpp)
if(MSVC) # vs2022+
target_link_libraries(tests3 ${CMAKE_CURRENT_SOURCE_DIR}/libvpx_prebuilt/lib/windows/vpxmd.lib)
endif()
if(MSVC) # vs2022+
target_link_options(tests3
PRIVATE $<$<CONFIG:MinSizeRel>:/LTCG>
PRIVATE $<$<CONFIG:Release>:/LTCG>
PRIVATE $<$<CONFIG:RelWithDebInfo>:/LTCG>
)
target_compile_options(tests3
PRIVATE $<$<PLATFORM_ID:Windows>:/std:c17>
PRIVATE $<$<PLATFORM_ID:Windows>:/bigobj>
)
set_source_files_properties(tests3/main.cpp PROPERTIES COMPILE_FLAGS "/Ycmain.h")
target_compile_options(tests3 PRIVATE $<$<PLATFORM_ID:Windows>:/Yumain.h>)
set_target_properties(tests3 PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
else()
target_precompile_headers(tests3
PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/tests3/main.h>
)
endif()
###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################
# tests4
include_directories(
tests4
spine-runtimes/spine-cpp/spine-cpp/include
)
set(SRCS)
file(GLOB SRCS #GLOB_RECURSE
tests4/*.h
tests4/*.hpp
tests4/*.inc
tests4/*.c
tests4/*.cpp
)
add_executable(tests4 ${SRCS})
target_link_libraries(tests4 ${name} glfw imgui pugixml libzstd_static)
target_link_libraries(tests4 spine-cpp)
if(MSVC) # vs2022+
target_link_libraries(tests4 ${CMAKE_CURRENT_SOURCE_DIR}/libvpx_prebuilt/lib/windows/vpxmd.lib)
endif()
if(MSVC) # vs2022+
target_link_options(tests4
PRIVATE $<$<CONFIG:MinSizeRel>:/LTCG>
PRIVATE $<$<CONFIG:Release>:/LTCG>
PRIVATE $<$<CONFIG:RelWithDebInfo>:/LTCG>
)
target_compile_options(tests4
PRIVATE $<$<PLATFORM_ID:Windows>:/std:c17>
PRIVATE $<$<PLATFORM_ID:Windows>:/bigobj>
)
set_source_files_properties(tests4/main.cpp PROPERTIES COMPILE_FLAGS "/Ycmain.h")
target_compile_options(tests4 PRIVATE $<$<PLATFORM_ID:Windows>:/Yumain.h>)
set_target_properties(tests4 PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
else()
target_precompile_headers(tests4
PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/tests4/main.h>
)
endif()
###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################
# tools
# movepath editor
include_directories(
tools/movepath_editor
)
set(SRCS)
file(GLOB SRCS #GLOB_RECURSE
tools/movepath_editor/*.h
tools/movepath_editor/*.hpp
tools/movepath_editor/*.inc
tools/movepath_editor/*.c
tools/movepath_editor/*.cpp
)
add_executable(tools_movepath_editor ${SRCS})
target_link_libraries(tools_movepath_editor ${name} glfw imgui imguicpp pugixml libzstd_static)
if(MSVC) # vs2022+
target_compile_options(tools_movepath_editor
PRIVATE $<$<PLATFORM_ID:Windows>:/std:c17>
PRIVATE $<$<PLATFORM_ID:Windows>:/bigobj>
)
set_source_files_properties(tools/movepath_editor/pch.cpp PROPERTIES COMPILE_FLAGS "/Ycpch.h")
target_compile_options(tools_movepath_editor PRIVATE $<$<PLATFORM_ID:Windows>:/Yupch.h>)
set_target_properties(tools_movepath_editor PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
else()
target_precompile_headers(tools_movepath_editor
PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/tools/movepath_editor/main.h>
)
endif()
###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################
# tools
# pngs 2 webm ( res viewer )
include_directories(
tools/pngs2webm
)
set(SRCS)
file(GLOB SRCS #GLOB_RECURSE
tools/pngs2webm/*.h
tools/pngs2webm/*.hpp
tools/pngs2webm/*.inc
tools/pngs2webm/*.c
tools/pngs2webm/*.cpp
)
add_executable(tools_pngs2webm ${SRCS})
target_link_libraries(tools_pngs2webm ${name} glfw imgui imguicpp pugixml libzstd_static)
if(MSVC) # vs2022+
target_link_libraries(tools_pngs2webm ${CMAKE_CURRENT_SOURCE_DIR}/libvpx_prebuilt/lib/windows/vpxmd.lib)
endif()
if(MSVC) # vs2022+
target_compile_options(tools_pngs2webm
PRIVATE $<$<PLATFORM_ID:Windows>:/std:c17>
PRIVATE $<$<PLATFORM_ID:Windows>:/bigobj>
)
set_source_files_properties(tools/pngs2webm/pch.cpp PROPERTIES COMPILE_FLAGS "/Ycpch.h")
target_compile_options(tools_pngs2webm PRIVATE $<$<PLATFORM_ID:Windows>:/Yupch.h>)
set_target_properties(tools_pngs2webm PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
else()
target_precompile_headers(tools_pngs2webm
PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/tools/pngs2webm/main.h>
)
endif()
###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################
# tools
# plist to blist ( for texture packer )
include_directories(
tools/plist2blist
)
set(SRCS)
file(GLOB SRCS #GLOB_RECURSE
tools/plist2blist/*.h
tools/plist2blist/*.hpp
tools/plist2blist/*.inc
tools/plist2blist/*.c
tools/plist2blist/*.cpp
)
add_executable(tools_plist2blist ${SRCS})
target_link_libraries(tools_plist2blist ${name} glfw imgui imguicpp pugixml libzstd_static)
if(MSVC) # vs2022+
target_link_libraries(tools_plist2blist ${CMAKE_CURRENT_SOURCE_DIR}/libvpx_prebuilt/lib/windows/vpxmd.lib)
endif()
if(MSVC) # vs2022+
target_compile_options(tools_plist2blist
PRIVATE $<$<PLATFORM_ID:Windows>:/std:c17>
PRIVATE $<$<PLATFORM_ID:Windows>:/bigobj>
)
set_source_files_properties(tools/plist2blist/pch.cpp PROPERTIES COMPILE_FLAGS "/Ycpch.h")
target_compile_options(tools_plist2blist PRIVATE $<$<PLATFORM_ID:Windows>:/Yupch.h>)
set_target_properties(tools_plist2blist PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
else()
target_precompile_headers(tools_plist2blist
PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/tools/plist2blist/main.h>
)
endif()
###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################
# tools
# tmx to bmx ( tiled map store file )
include_directories(
tools/tmx2bmx
)
set(SRCS)
file(GLOB SRCS #GLOB_RECURSE
tools/tmx2bmx/*.h
tools/tmx2bmx/*.hpp
tools/tmx2bmx/*.inc
tools/tmx2bmx/*.c
tools/tmx2bmx/*.cpp
)
add_executable(tools_tmx2bmx ${SRCS})
target_link_libraries(tools_tmx2bmx ${name} glfw imgui imguicpp pugixml libzstd_static)
if(MSVC) # vs2022+
target_link_libraries(tools_tmx2bmx ${CMAKE_CURRENT_SOURCE_DIR}/libvpx_prebuilt/lib/windows/vpxmd.lib)
endif()
if(MSVC) # vs2022+
target_compile_options(tools_tmx2bmx
PRIVATE $<$<PLATFORM_ID:Windows>:/std:c17>
PRIVATE $<$<PLATFORM_ID:Windows>:/bigobj>
)
set_source_files_properties(tools/tmx2bmx/pch.cpp PROPERTIES COMPILE_FLAGS "/Ycpch.h")
target_compile_options(tools_tmx2bmx PRIVATE $<$<PLATFORM_ID:Windows>:/Yupch.h>)
set_target_properties(tools_tmx2bmx PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
else()
target_precompile_headers(tools_tmx2bmx
PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/tools/tmx2bmx/main.h>
)
endif()