forked from heyigor/miniBAE
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
2180 lines (2022 loc) · 89.2 KB
/
CMakeLists.txt
File metadata and controls
2180 lines (2022 loc) · 89.2 KB
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
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
cmake_minimum_required(VERSION 3.10)
project(NeoBAE LANGUAGES C CXX)
set(NEOBAE_RC_ENABLED OFF)
include(CheckLanguage)
check_language(RC)
if(CMAKE_RC_COMPILER)
enable_language(RC)
set(NEOBAE_RC_ENABLED ON)
endif()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
if(POLICY CMP0003)
cmake_policy(SET CMP0003 NEW)
endif()
# Version string generation equivalent to neobae/inc/Makefile.versioning.
set(BAE_VERSION "")
find_package(Git QUIET)
if(GIT_FOUND)
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE BAE_GIT_COMMIT
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
execute_process(
COMMAND ${GIT_EXECUTABLE} status --porcelain
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE BAE_GIT_STATUS
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-list --abbrev-commit --tags --max-count=1
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE BAE_GIT_TAG_COMMIT
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
set(BAE_GIT_TAG "")
if(NOT BAE_GIT_TAG_COMMIT STREQUAL "")
execute_process(
COMMAND ${GIT_EXECUTABLE} describe --abbrev=0 --tags ${BAE_GIT_TAG_COMMIT}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE BAE_GIT_TAG
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
endif()
execute_process(
COMMAND ${GIT_EXECUTABLE} log -1 --format=%cd --date=format:%Y%m%d
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE BAE_GIT_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
endif()
if(BAE_GIT_COMMIT STREQUAL "")
if(BAE_GIT_DATE STREQUAL "")
string(TIMESTAMP BAE_GIT_DATE "%Y%m%d")
endif()
set(BAE_VERSION "${BAE_GIT_DATE}")
else()
if(NOT BAE_GIT_TAG STREQUAL "")
if(BAE_GIT_COMMIT STREQUAL BAE_GIT_TAG_COMMIT)
string(REGEX REPLACE "^v" "" BAE_VERSION "${BAE_GIT_TAG}")
else()
set(BAE_VERSION "git-${BAE_GIT_COMMIT}")
endif()
else()
set(BAE_VERSION "git-${BAE_GIT_COMMIT}")
endif()
if(NOT BAE_GIT_STATUS STREQUAL "")
set(BAE_VERSION "${BAE_VERSION}-dirty")
endif()
endif()
add_compile_definitions(_VERSION="${BAE_VERSION}")
message(STATUS "NeoBAE build version: ${BAE_VERSION}")
option(DEBUG "Enable debuggable build (zefidi debug console, gdb debugging)" OFF)
option(NEOBAE_STATIC "Enable static linking for NeoBAE apps and dependencies (best support on MinGW)" OFF)
option(NEOBAE_BUILD_VCLIB "Build an additional MSVC-style import library for libneobae.dll using dlltool" OFF)
if(NEOBAE_STATIC AND NOT DEFINED CACHE{NEOBAE_EXTERNAL_CODECS})
set(NEOBAE_EXTERNAL_CODECS ON CACHE BOOL "Use external system libraries for codecs when available instead of bundled sources (FLAC, LAME, Vorbis, Opus, Ogg)" FORCE)
endif()
if(NEOBAE_STATIC AND NOT DEFINED CACHE{NEOBAE_SHARED_LIBNEOBAE})
set(NEOBAE_SHARED_LIBNEOBAE ON CACHE BOOL "Build libneobae as shared (DLL/.so) while keeping static dependency preference" FORCE)
endif()
if (NOT DEBUG)
add_compile_options(-O2)
else()
message(STATUS "Debug build: enabling debug symbols and disabling optimizations")
add_compile_options(-g -O0 -ggdb3 -fPIC -D_DEBUG=1)
endif()
if(NEOBAE_STATIC)
message(STATUS "NEOBAE_STATIC enabled: preferring static linkage for apps and dependencies")
if(MINGW)
# Prefer static archives first when resolving libraries in MinGW static mode.
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" ".lib")
# Prevent executable import libraries like libzefidi.dll.a in static app builds.
set(CMAKE_EXECUTABLE_ENABLE_EXPORTS OFF)
if(NEOBAE_SHARED_LIBNEOBAE)
# Keep static runtime libs but avoid global -static so shared libneobae can link.
add_link_options(-static-libgcc $<$<LINK_LANGUAGE:CXX>:-static-libstdc++>)
else()
add_link_options(-static -static-libgcc $<$<LINK_LANGUAGE:CXX>:-static-libstdc++>)
endif()
endif()
endif()
option(BAE_DISABLE_RMF_EDITOR "Disable BAERmfEditor (Creation API) support" OFF)
option(BAE_DISABLE_SF2_CONVERTER "Disable SF2 converter support" OFF)
option(BAE_DISABLE_ZMF "Disable ZMF support" OFF)
option(BAE_DISABLE_LZMA "Disable LZMA compression support" OFF)
option(BAE_DISABLE_MP3_ENCODER "Disable MP3 encoder support" OFF)
option(BAE_DISABLE_MP3_DECODER "Disable MP3 decoder support" OFF)
option(BAE_DISABLE_FLAC_ENCODER "Disable FLAC encoder support" OFF)
option(BAE_DISABLE_FLAC_DECODER "Disable FLAC decoder support" OFF)
option(BAE_DISABLE_VORBIS_ENCODER "Disable Vorbis encoder support" OFF)
option(BAE_DISABLE_VORBIS_DECODER "Disable Vorbis decoder support" OFF)
option(BAE_DISABLE_OPUS_ENCODER "Disable Opus encoder support" OFF)
option(BAE_DISABLE_OPUS_DECODER "Disable Opus decoder support" OFF)
option(BAE_DISABLE_KARAOKE "Disable karaoke support" OFF)
option(BAE_DISABLE_BAESCRIPT "Disable BAEScript support" OFF)
option(BAE_DISABLE_PLAYLIST "Disable playlist support" OFF)
option(BAE_DISABLE_SF2_SUPPORT "Disable SF2 support" OFF)
option(BAE_DISABLE_FLUIDSYNTH "Disable FluidSynth integration" OFF)
option(BAE_DISABLE_XMF_SUPPORT "Disable XMF support" OFF)
option(BAE_DISABLE_NOKIA_PATCH "Disable Nokia patch handling" OFF)
option(BAE_DISABLE_BEATNIK_SF2_NRPN "Disable Beatnik SF2 NRPN behavior" OFF)
option(BAE_DISABLE_BUILTIN_PATCHES_WITH_SF2 "Disable loading built-in patches for SF2" OFF)
option(BAE_DISABLE_FIX_SPAN_DC "Disable span DC fix" OFF)
option(BAE_DISABLE_CLASSIC_CHORUS "Disable classic chorus path" OFF)
option(BAE_DISABLE_MTHC_SUPPORT "Disable MTHC support" OFF)
option(BAE_DISABLE_ADP_SUPPORT "Disable ADP support" OFF)
option(BAE_DISABLE_CREATION_API "Disable Creation API support (alias for RMF editor APIs)" OFF)
option(BAE_DISABLE_EMBED_PATCHES "Disable embedded built-in patches" OFF)
option(BAE_DISABLE_EMBED_FONT "Disable embedded GUI font" OFF)
option(BAE_DISABLE_RETRO_RINGTONE_SUPPORT "Disable retro mobile ringtone format support (IMY/EMY/RNG/RTX/RTTTL)" OFF)
option(BAE_DISABLE_QOA_SUPPORT "Disable QOA codec support" OFF)
option(BAE_DISABLE_RMI_SUPPORT "Disable RMI support" OFF)
option(BAE_DISABLE_ROLLED_MIDI_UNROLLING "Disable unrolling of rolled MIDI files" OFF)
set(BAE_EMBED_PATCH_FILE "${CMAKE_CURRENT_SOURCE_DIR}/neobae/src/banks/patches111/patches111.hsb" CACHE FILEPATH "HSB bank file to embed as built-in patches (empty disables embedding)")
set(BAE_EMBED_TTF_FILE "src/thirdparty/fonts/HelveticaNeue.ttf" CACHE FILEPATH "TTF font file to embed for zefidi GUI use (empty disables embedding)")
option(BUILD_PLAYBAE "Build playbae when a non-Dummy/non-Ansi backend is selected" ON)
option(BUILD_NEOBAE_TUI "Build ncurses textual GUI variant of playbae" ON)
option(BUILD_ZEFIDI "Build zefidi when SDL2/SDL3 backend and matching SDL_ttf are available" ON)
option(ENABLE_MIDI_HW "Enable hardware MIDI I/O in zefidi via RtMidi" OFF)
option(BUILD_CLITOOLS "Build CLI tools (songtool, rmf2mid, mid2rmf, mid2rmi, sf2-hsb, mod2rmf, instdump, bankrecomp)" ON)
option(BUILD_NBSTUDIO "Build NeoBAE Studio (RMF/ZMF editor) when wxWidgets is found" ON)
option(BUILD_NBEDITOR "Build NeoBAE Editor (Dear ImGui + SDL3)" ON)
option(BUILD_RAYLIB_PLAYER "Build the raylib-based mini GUI player" ON)
set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "Build type (Debug, Release, RelWithDebInfo, MinSizeRel)" FORCE)
# Internal compatibility booleans: keep existing logic in terms of ENABLE vars.
set(BAE_ENABLE_RMF_EDITOR ON)
set(BAE_ENABLE_SF2_CONVERTER ON)
set(BAE_ENABLE_ZMF ON)
set(BAE_ENABLE_LZMA ON)
set(BAE_ENABLE_MP3_ENCODER ON)
set(BAE_ENABLE_MP3_DECODER ON)
set(BAE_ENABLE_FLAC_ENCODER ON)
set(BAE_ENABLE_FLAC_DECODER ON)
set(BAE_ENABLE_VORBIS_ENCODER ON)
set(BAE_ENABLE_VORBIS_DECODER ON)
set(BAE_ENABLE_OPUS_ENCODER ON)
set(BAE_ENABLE_OPUS_DECODER ON)
set(BAE_ENABLE_KARAOKE ON)
set(BAE_ENABLE_BAESCRIPT ON)
set(BAE_ENABLE_PLAYLIST ON)
set(BAE_ENABLE_SF2_SUPPORT ON)
set(BAE_ENABLE_FLUIDSYNTH ON)
set(BAE_ENABLE_XMF_SUPPORT ON)
set(BAE_ENABLE_NOKIA_PATCH ON)
set(BAE_ENABLE_BEATNIK_SF2_NRPN ON)
set(BAE_ENABLE_BUILTIN_PATCHES_WITH_SF2 ON)
set(BAE_ENABLE_FIX_SPAN_DC ON)
set(BAE_ENABLE_CLASSIC_CHORUS ON)
set(BAE_ENABLE_MTHC_SUPPORT ON)
set(BAE_ENABLE_ADP_SUPPORT ON)
set(BAE_ENABLE_EMBED_PATCHES ON)
set(BAE_ENABLE_EMBED_FONT ON)
set(BAE_ENABLE_RETRO_RINGTONE_SUPPORT ON)
set(BAE_ENABLE_QOA_SUPPORT ON)
set(BAE_ENABLE_RMI_SUPPORT ON)
set(BAE_ENABLE_ROLLED_MIDI_UNROLL ON)
if(BAE_DISABLE_RMF_EDITOR)
set(BAE_ENABLE_RMF_EDITOR OFF)
message(STATUS "Disabling RMF/ZMF Creation API Support")
else()
message(STATUS "Enabling RMF/ZMF Creation API Support")
endif()
if(BAE_DISABLE_SF2_CONVERTER)
set(BAE_ENABLE_SF2_CONVERTER OFF)
message(STATUS "Disabling SF2 Converter Support")
else()
message(STATUS "Enabling SF2 Converter Support")
endif()
if(BAE_DISABLE_ZMF)
set(BAE_ENABLE_ZMF OFF)
message(STATUS "Disabling ZMF Support")
else()
message(STATUS "Enabling ZMF Support")
endif()
if(BAE_DISABLE_LZMA)
set(BAE_ENABLE_LZMA OFF)
message(STATUS "Disabling LZMA Support")
else()
message(STATUS "Enabling LZMA Support")
endif()
if(BAE_DISABLE_MP3_ENCODER)
set(BAE_ENABLE_MP3_ENCODER OFF)
message(STATUS "Disabling MP3 encoder support")
endif()
if(BAE_DISABLE_MP3_DECODER)
set(BAE_ENABLE_MP3_DECODER OFF)
message(STATUS "Disabling MP3 decoder support")
endif()
if(BAE_DISABLE_FLAC_ENCODER)
set(BAE_ENABLE_FLAC_ENCODER OFF)
message(STATUS "Disabling FLAC encoder support")
endif()
if(BAE_DISABLE_FLAC_DECODER)
set(BAE_ENABLE_FLAC_DECODER OFF)
message(STATUS "Disabling FLAC decoder support")
endif()
if(BAE_DISABLE_VORBIS_ENCODER)
set(BAE_ENABLE_VORBIS_ENCODER OFF)
message(STATUS "Disabling Vorbis encoder support")
endif()
if(BAE_DISABLE_VORBIS_DECODER)
set(BAE_ENABLE_VORBIS_DECODER OFF)
message(STATUS "Disabling Vorbis decoder support")
endif()
if(BAE_DISABLE_OPUS_ENCODER)
set(BAE_ENABLE_OPUS_ENCODER OFF)
message(STATUS "Disabling Opus encoder support")
endif()
if(BAE_DISABLE_OPUS_DECODER)
set(BAE_ENABLE_OPUS_DECODER OFF)
message(STATUS "Disabling Opus decoder support")
endif()
if(BAE_DISABLE_RETRO_RINGTONE_SUPPORT)
set(BAE_ENABLE_RETRO_RINGTONE_SUPPORT OFF)
message(STATUS "Disabling retro mobile ringtone format support (IMY/EMY/RNG/RTX/RTTTL)")
else()
message(STATUS "Enabling retro mobile ringtone format support (IMY/EMY/RNG/RTX/RTTTL)")
endif()
if (BAE_DISABLE_QOA_SUPPORT)
set(BAE_ENABLE_QOA_SUPPORT OFF)
message(STATUS "Disabling QOA codec support")
else()
message(STATUS "Enabling QOA codec support")
endif()
if(BAE_DISABLE_KARAOKE)
set(BAE_ENABLE_KARAOKE OFF)
endif()
if(BAE_DISABLE_BAESCRIPT)
set(BAE_ENABLE_BAESCRIPT OFF)
endif()
if(BAE_DISABLE_PLAYLIST)
set(BAE_ENABLE_PLAYLIST OFF)
endif()
if(BAE_DISABLE_SF2_SUPPORT)
set(BAE_ENABLE_SF2_SUPPORT OFF)
endif()
if(BAE_DISABLE_FLUIDSYNTH)
set(BAE_ENABLE_FLUIDSYNTH OFF)
endif()
if(BAE_DISABLE_XMF_SUPPORT)
set(BAE_ENABLE_XMF_SUPPORT OFF)
endif()
if(BAE_DISABLE_NOKIA_PATCH)
set(BAE_ENABLE_NOKIA_PATCH OFF)
endif()
if(BAE_DISABLE_BEATNIK_SF2_NRPN)
set(BAE_ENABLE_BEATNIK_SF2_NRPN OFF)
endif()
if(BAE_DISABLE_BUILTIN_PATCHES_WITH_SF2)
set(BAE_ENABLE_BUILTIN_PATCHES_WITH_SF2 OFF)
endif()
if(BAE_DISABLE_FIX_SPAN_DC)
set(BAE_ENABLE_FIX_SPAN_DC OFF)
endif()
if(BAE_DISABLE_CLASSIC_CHORUS)
set(BAE_ENABLE_CLASSIC_CHORUS OFF)
endif()
if(BAE_DISABLE_MTHC_SUPPORT)
set(BAE_ENABLE_MTHC_SUPPORT OFF)
endif()
if(BAE_DISABLE_ADP_SUPPORT)
set(BAE_ENABLE_ADP_SUPPORT OFF)
endif()
if(BAE_DISABLE_CREATION_API)
set(BAE_ENABLE_RMF_EDITOR OFF)
endif()
if(BAE_DISABLE_EMBED_PATCHES)
set(BAE_ENABLE_EMBED_PATCHES OFF)
endif()
if(BAE_DISABLE_EMBED_FONT)
set(BAE_ENABLE_EMBED_FONT OFF)
endif()
if(BAE_DISABLE_RMI_SUPPORT)
set(BAE_ENABLE_RMI_SUPPORT OFF)
endif()
if(BAE_DISABLE_ROLLED_MIDI_UNROLL)
set(BAE_ENABLE_ROLLED_MIDI_UNROLL OFF)
endif()
set(BAE_EMBED_PATCHES_EFFECTIVE OFF)
if(BAE_ENABLE_EMBED_PATCHES)
if(BAE_EMBED_PATCH_FILE STREQUAL "")
message(STATUS "Disabling built-in embedded patches: BAE_EMBED_PATCH_FILE is empty")
elseif(NOT EXISTS "${BAE_EMBED_PATCH_FILE}")
message(STATUS "Disabling built-in embedded patches: bank file not found at '${BAE_EMBED_PATCH_FILE}'")
else()
find_package(Python3 COMPONENTS Interpreter QUIET)
if(NOT Python3_Interpreter_FOUND)
message(STATUS "Disabling built-in embedded patches: Python3 interpreter not found")
else()
set(BAE_EMBED_PATCHES_EFFECTIVE ON)
message(STATUS "Enabling built-in embedded patches from '${BAE_EMBED_PATCH_FILE}'")
endif()
endif()
endif()
# FluidSynth probe and gating for SF2/XMF behavior from Makefile.common.
set(BAE_FLUIDSYNTH_AVAILABLE OFF)
unset(BAE_FLUIDSYNTH_INCLUDE_DIR)
unset(BAE_FLUIDSYNTH_LIBRARY)
if(BAE_ENABLE_FLUIDSYNTH)
find_package(PkgConfig QUIET)
if(PkgConfig_FOUND)
pkg_check_modules(FLUIDSYNTH QUIET fluidsynth)
endif()
if(FLUIDSYNTH_FOUND)
set(BAE_FLUIDSYNTH_INCLUDE_DIR ${FLUIDSYNTH_INCLUDE_DIRS})
set(BAE_FLUIDSYNTH_LIBRARY ${FLUIDSYNTH_LIBRARIES})
set(BAE_FLUIDSYNTH_AVAILABLE ON)
else()
message(STATUS "FluidSynth not found via pkg-config.")
endif()
else()
message(STATUS "FluidSynth support disabled by configuration; skipping FluidSynth probe")
endif()
if(BAE_FLUIDSYNTH_INCLUDE_DIR AND BAE_FLUIDSYNTH_LIBRARY)
set(BAE_FLUIDSYNTH_AVAILABLE ON)
endif()
if(BAE_ENABLE_FLUIDSYNTH AND NOT BAE_FLUIDSYNTH_AVAILABLE)
set(BAE_ENABLE_FLUIDSYNTH OFF)
message(STATUS "Disabling FluidSynth support: library/headers not found")
endif()
if(BAE_ENABLE_SF2_SUPPORT AND NOT BAE_ENABLE_FLUIDSYNTH)
set(BAE_ENABLE_SF2_SUPPORT OFF)
message(STATUS "Disabling SF2 support because FluidSynth is unavailable/disabled")
endif()
if(BAE_ENABLE_XMF_SUPPORT AND NOT BAE_ENABLE_FLUIDSYNTH)
set(BAE_ENABLE_XMF_SUPPORT OFF)
message(STATUS "Disabling XMF support because FluidSynth is unavailable/disabled")
endif()
# External codec dependency probes (system libs).
set(BAE_LAME_WRAPPER_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/neobae/src/BAE_MPEG_Source_II/XMPEG_lame_encoder.cpp")
set(BAE_LAME_WRAPPER_AVAILABLE OFF)
if(EXISTS "${BAE_LAME_WRAPPER_SOURCE}")
set(BAE_LAME_WRAPPER_AVAILABLE ON)
endif()
find_path(BAE_LAME_INCLUDE_DIR lame/lame.h)
find_library(BAE_LAME_LIBRARY NAMES mp3lame lame)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_LAME QUIET libmp3lame)
if(NOT BAE_LAME_INCLUDE_DIR AND PC_LAME_FOUND)
set(BAE_LAME_INCLUDE_DIR ${PC_LAME_INCLUDE_DIRS})
endif()
if(NOT BAE_LAME_LIBRARY AND PC_LAME_FOUND)
find_library(BAE_LAME_LIBRARY NAMES mp3lame lame HINTS ${PC_LAME_LIBRARY_DIRS})
endif()
endif()
set(BAE_MP3_ENCODER_AVAILABLE OFF)
if(BAE_LAME_WRAPPER_AVAILABLE AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/neobae/src/thirdparty/lame-3.100-slim/include/lame.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/neobae/src/thirdparty/lame-3.100-slim/libmp3lame/lame.c")
set(BAE_MP3_ENCODER_AVAILABLE ON)
endif()
set(BAE_FLAC_AVAILABLE OFF)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/neobae/src/thirdparty/flac/include/FLAC/all.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/neobae/src/thirdparty/flac/src/libFLAC/stream_decoder.c")
set(BAE_FLAC_AVAILABLE ON)
endif()
find_path(BAE_VORBIS_INCLUDE_DIR vorbis/codec.h)
find_library(BAE_VORBIS_LIBRARY NAMES vorbis)
find_library(BAE_VORBISFILE_LIBRARY NAMES vorbisfile)
find_library(BAE_VORBISENC_LIBRARY NAMES vorbisenc)
set(BAE_VORBIS_DECODER_AVAILABLE OFF)
set(BAE_VORBIS_ENCODER_AVAILABLE OFF)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/neobae/src/thirdparty/libvorbis/lib/info.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/neobae/src/thirdparty/libvorbis/lib/vorbisfile.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/neobae/src/thirdparty/libogg/src/framing.c")
set(BAE_VORBIS_DECODER_AVAILABLE ON)
set(BAE_VORBIS_ENCODER_AVAILABLE ON)
endif()
set(BAE_OPUS_ENCODER_AVAILABLE OFF)
set(BAE_OPUS_DECODER_AVAILABLE OFF)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/neobae/src/thirdparty/opus/include/opus.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/neobae/src/thirdparty/opus/src/opus.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/neobae/src/thirdparty/opus/celt/celt_encoder.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/neobae/src/thirdparty/opus/silk/enc_API.c")
set(BAE_OPUS_ENCODER_AVAILABLE ON)
endif()
if(BAE_OPUS_ENCODER_AVAILABLE AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/neobae/src/thirdparty/opusfile/include/opusfile.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/neobae/src/thirdparty/opusfile/src/opusfile.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/neobae/src/thirdparty/opusfile/src/info.c")
set(BAE_OPUS_DECODER_AVAILABLE ON)
endif()
find_path(BAE_OGG_INCLUDE_DIR ogg/ogg.h)
find_library(BAE_OGG_LIBRARY NAMES ogg)
set(BAE_OGG_AVAILABLE OFF)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/neobae/src/thirdparty/libogg/src/framing.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/neobae/src/thirdparty/libogg/src/bitwise.c")
set(BAE_OGG_AVAILABLE ON)
endif()
# Auto-disable codec toggles when required external dependencies are missing.
if(BAE_ENABLE_FLAC_DECODER AND NOT BAE_FLAC_AVAILABLE)
set(BAE_ENABLE_FLAC_DECODER OFF)
message(STATUS "Disabling FLAC decoder: bundled libFLAC sources not found (did you forget to submodule update --init --recursive?)")
else()
if(BAE_ENABLE_FLAC_DECODER)
message(STATUS "Enabling FLAC decoder: using bundled libFLAC sources")
endif()
endif()
if(BAE_ENABLE_MP3_ENCODER AND NOT BAE_MP3_ENCODER_AVAILABLE)
set(BAE_ENABLE_MP3_ENCODER OFF)
message(STATUS "Disabling MP3 encoder: bundled LAME sources not found")
else()
if(BAE_ENABLE_MP3_ENCODER)
message(STATUS "Enabling MP3 encoder: using bundled LAME sources")
endif()
endif()
if(BAE_ENABLE_FLAC_ENCODER AND NOT BAE_FLAC_AVAILABLE)
set(BAE_ENABLE_FLAC_ENCODER OFF)
message(STATUS "Disabling FLAC encoder: bundled libFLAC sources not found (did you forget to submodule update --init --recursive?)")
else()
if(BAE_ENABLE_FLAC_ENCODER)
message(STATUS "Enabling FLAC encoder: using bundled libFLAC sources")
endif()
endif()
if(BAE_ENABLE_VORBIS_DECODER AND (NOT BAE_VORBIS_DECODER_AVAILABLE OR NOT BAE_OGG_AVAILABLE))
set(BAE_ENABLE_VORBIS_DECODER OFF)
message(STATUS "Disabling Vorbis decoder: bundled Vorbis/Ogg sources not found (did you forget to submodule update --init --recursive?)")
else()
if(BAE_ENABLE_VORBIS_DECODER)
message(STATUS "Enabling Vorbis decoder: using bundled Vorbis/Ogg sources")
endif()
endif()
if(BAE_ENABLE_VORBIS_ENCODER AND (NOT BAE_VORBIS_ENCODER_AVAILABLE OR NOT BAE_OGG_AVAILABLE))
set(BAE_ENABLE_VORBIS_ENCODER OFF)
message(STATUS "Disabling Vorbis encoder: bundled Vorbis/Ogg sources not found (did you forget to submodule update --init --recursive?)")
else()
if(BAE_ENABLE_VORBIS_ENCODER)
message(STATUS "Enabling Vorbis encoder: using bundled Vorbis/Ogg sources")
endif()
endif()
if(BAE_ENABLE_OPUS_DECODER AND (NOT BAE_OPUS_DECODER_AVAILABLE OR NOT BAE_OGG_AVAILABLE))
set(BAE_ENABLE_OPUS_DECODER OFF)
message(STATUS "Disabling Opus decoder: bundled Opus/Opusfile/Ogg sources not found (did you forget to submodule update --init --recursive?)")
else()
if(BAE_ENABLE_OPUS_DECODER)
message(STATUS "Enabling Opus decoder: using bundled Opus/Opusfile/Ogg sources")
endif()
endif()
if(BAE_ENABLE_OPUS_ENCODER AND (NOT BAE_OPUS_ENCODER_AVAILABLE OR NOT BAE_OGG_AVAILABLE))
set(BAE_ENABLE_OPUS_ENCODER OFF)
message(STATUS "Disabling Opus encoder: bundled Opus/Ogg sources not found")
else()
if(BAE_ENABLE_OPUS_ENCODER)
message(STATUS "Enabling Opus encoder: using bundled Opus/Ogg sources")
endif()
endif()
if(NOT DEFINED BAE_PLATFORM OR BAE_PLATFORM STREQUAL "")
set(_BAE_PLATFORM_DEFAULT "Dummy")
find_path(_BAE_DEFAULT_SDL3_INCLUDE_DIR SDL3/SDL.h)
find_library(_BAE_DEFAULT_SDL3_LIBRARY NAMES SDL3)
if(_BAE_DEFAULT_SDL3_INCLUDE_DIR AND _BAE_DEFAULT_SDL3_LIBRARY)
set(_BAE_PLATFORM_DEFAULT "SDL3")
message(STATUS "Defaulting to SDL3 platform backend (found SDL3 headers and library).")
else()
find_path(_BAE_DEFAULT_SDL2_INCLUDE_DIR SDL2/SDL.h)
find_library(_BAE_DEFAULT_SDL2_LIBRARY NAMES SDL2)
if(_BAE_DEFAULT_SDL2_INCLUDE_DIR AND _BAE_DEFAULT_SDL2_LIBRARY)
set(_BAE_PLATFORM_DEFAULT "SDL2")
message(STATUS "Defaulting to SDL2 platform backend (found SDL2 headers and library).")
endif()
endif()
set(BAE_PLATFORM "${_BAE_PLATFORM_DEFAULT}" CACHE STRING "Backend platform (Dummy, SDL2, SDL3, Raylib, WinOS, Ansi, WASM, Android, IOS, MacOSX, foobar2000)")
else()
set(BAE_PLATFORM "${BAE_PLATFORM}" CACHE STRING "Backend platform (Dummy, SDL2, SDL3, Raylib, WinOS, Ansi, WASM, Android, IOS, MacOSX, foobar2000)")
endif()
message(STATUS "Selected BAE_PLATFORM='${BAE_PLATFORM}'")
set_property(CACHE BAE_PLATFORM PROPERTY STRINGS Dummy SDL2 SDL3 Raylib WinOS Ansi WASM Android IOS MacOSX foobar2000)
set(BAE_PLATFORM_SOURCE "")
set(BAE_X_PLATFORM_DEFINE "")
if(BAE_PLATFORM STREQUAL "Dummy")
set(BAE_PLATFORM_SOURCE neobae/src/BAE_Source/Platform/BAE_API_Dummy.c)
set(BAE_X_PLATFORM_DEFINE X_DUMMY)
elseif(BAE_PLATFORM STREQUAL "SDL2")
set(BAE_PLATFORM_SOURCE neobae/src/BAE_Source/Platform/BAE_API_SDL2.c)
set(BAE_X_PLATFORM_DEFINE X_SDL2)
elseif(BAE_PLATFORM STREQUAL "SDL3")
set(BAE_PLATFORM_SOURCE neobae/src/BAE_Source/Platform/BAE_API_SDL3.c)
set(BAE_X_PLATFORM_DEFINE X_SDL3)
elseif(BAE_PLATFORM STREQUAL "Raylib")
set(BAE_PLATFORM_SOURCE neobae/src/BAE_Source/Platform/BAE_API_Raylib.c)
set(BAE_X_PLATFORM_DEFINE X_RAYLIB)
elseif(BAE_PLATFORM STREQUAL "WinOS")
set(BAE_PLATFORM_SOURCE
neobae/src/BAE_Source/Platform/BAE_API_WinOS.c
neobae/src/BAE_Source/Platform/BAE_API_WinOS_Capture.c
neobae/src/BAE_Source/Platform/BAE_API_WinOS_Thread.c
)
set(BAE_X_PLATFORM_DEFINE X_WIN95)
elseif(BAE_PLATFORM STREQUAL "Ansi")
set(BAE_PLATFORM_SOURCE neobae/src/BAE_Source/Platform/BAE_API_Ansi.c)
set(BAE_X_PLATFORM_DEFINE X_ANSI)
elseif(BAE_PLATFORM STREQUAL "WASM")
set(BAE_PLATFORM_SOURCE neobae/src/BAE_Source/Platform/BAE_API_WASM.c)
set(BAE_X_PLATFORM_DEFINE X_WASM)
elseif(BAE_PLATFORM STREQUAL "Android")
set(BAE_PLATFORM_SOURCE neobae/src/BAE_Source/Platform/BAE_API_Android.c)
set(BAE_X_PLATFORM_DEFINE X_ANDROID)
elseif(BAE_PLATFORM STREQUAL "IOS")
set(BAE_PLATFORM_SOURCE neobae/src/BAE_Source/Platform/BAE_API_IOS.c)
set(BAE_X_PLATFORM_DEFINE X_IOS)
elseif(BAE_PLATFORM STREQUAL "MacOSX")
set(BAE_PLATFORM_SOURCE neobae/src/BAE_Source/Platform/BAE_API_MacOSX.c)
set(BAE_X_PLATFORM_DEFINE X_MACINTOSH)
elseif(BAE_PLATFORM STREQUAL "foobar2000")
set(BAE_PLATFORM_SOURCE neobae/src/BAE_Source/Platform/BAE_API_foobar2000.c)
set(BAE_X_PLATFORM_DEFINE X_FOOBAR2000_PLUGIN)
else()
message(FATAL_ERROR "Unsupported BAE_PLATFORM='${BAE_PLATFORM}'.")
endif()
set(BAE_SDL_BACKEND_AVAILABLE OFF)
if(BAE_PLATFORM STREQUAL "SDL2")
find_path(BAE_SDL2_INCLUDE_DIR SDL2/SDL.h)
find_library(BAE_SDL2_LIBRARY NAMES SDL2)
if(BAE_SDL2_INCLUDE_DIR AND BAE_SDL2_LIBRARY)
set(BAE_SDL_BACKEND_AVAILABLE ON)
else()
message(STATUS "BAE_PLATFORM=SDL2 selected, but SDL2 headers/library were not found.")
endif()
elseif(BAE_PLATFORM STREQUAL "SDL3")
find_path(BAE_SDL3_INCLUDE_DIR SDL3/SDL.h)
find_library(BAE_SDL3_LIBRARY NAMES SDL3)
if(BAE_SDL3_INCLUDE_DIR AND BAE_SDL3_LIBRARY)
set(BAE_SDL_BACKEND_AVAILABLE ON)
else()
message(STATUS "BAE_PLATFORM=SDL3 selected, but SDL3 headers/library were not found.")
endif()
endif()
set(BAE_SDL_TTF_AVAILABLE OFF)
set(ZEFIDI_SDL_BACKEND_AVAILABLE OFF)
set(ZEFIDI_SDL_VERSION "")
set(ZEFIDI_SDL_INCLUDE_DIR "")
set(ZEFIDI_SDL_LIBRARY "")
set(ZEFIDI_SDL_TTF_INCLUDE_DIR "")
set(ZEFIDI_SDL_TTF_LIBRARY "")
if(BUILD_ZEFIDI)
message(STATUS "Checking for SDL support for zefidi...")
if(BAE_PLATFORM STREQUAL "SDL2")
find_path(BAE_SDL2_TTF_INCLUDE_DIR SDL2/SDL_ttf.h)
find_library(BAE_SDL2_TTF_LIBRARY NAMES SDL2_ttf)
if(BAE_SDL2_TTF_INCLUDE_DIR AND BAE_SDL2_TTF_LIBRARY)
set(BAE_SDL_TTF_AVAILABLE ON)
message(STATUS "SDL_ttf support found for SDL2 backend.")
else()
message(STATUS "BAE_PLATFORM=SDL2 selected, but SDL2_ttf headers/library were not found.")
endif()
elseif(BAE_PLATFORM STREQUAL "SDL3")
find_path(BAE_SDL3_TTF_INCLUDE_DIR SDL3_ttf/SDL_ttf.h)
find_library(BAE_SDL3_TTF_LIBRARY NAMES SDL3_ttf)
if(BAE_SDL3_TTF_INCLUDE_DIR AND BAE_SDL3_TTF_LIBRARY)
set(BAE_SDL_TTF_AVAILABLE ON)
message(STATUS "SDL_ttf support found for SDL3 backend.")
else()
message(STATUS "BAE_PLATFORM=SDL3 selected, but SDL3_ttf headers/library were not found.")
endif()
endif()
if(NOT BAE_SDL3_INCLUDE_DIR)
find_path(BAE_SDL3_INCLUDE_DIR SDL3/SDL.h)
endif()
if(NOT BAE_SDL3_LIBRARY)
find_library(BAE_SDL3_LIBRARY NAMES SDL3)
endif()
if(NOT BAE_SDL3_TTF_INCLUDE_DIR)
find_path(BAE_SDL3_TTF_INCLUDE_DIR SDL3_ttf/SDL_ttf.h)
endif()
if(NOT BAE_SDL3_TTF_LIBRARY)
find_library(BAE_SDL3_TTF_LIBRARY NAMES SDL3_ttf)
endif()
if(NOT BAE_SDL2_INCLUDE_DIR)
find_path(BAE_SDL2_INCLUDE_DIR SDL2/SDL.h)
endif()
if(NOT BAE_SDL2_LIBRARY)
find_library(BAE_SDL2_LIBRARY NAMES SDL2)
endif()
if(NOT BAE_SDL2_TTF_INCLUDE_DIR)
find_path(BAE_SDL2_TTF_INCLUDE_DIR SDL2/SDL_ttf.h)
endif()
if(NOT BAE_SDL2_TTF_LIBRARY)
find_library(BAE_SDL2_TTF_LIBRARY NAMES SDL2_ttf)
endif()
if(BAE_PLATFORM STREQUAL "SDL3"
AND BAE_SDL3_INCLUDE_DIR AND BAE_SDL3_LIBRARY
AND BAE_SDL3_TTF_INCLUDE_DIR AND BAE_SDL3_TTF_LIBRARY)
set(ZEFIDI_SDL_BACKEND_AVAILABLE ON)
set(ZEFIDI_SDL_VERSION "SDL3")
set(ZEFIDI_SDL_INCLUDE_DIR ${BAE_SDL3_INCLUDE_DIR})
set(ZEFIDI_SDL_LIBRARY ${BAE_SDL3_LIBRARY})
set(ZEFIDI_SDL_TTF_INCLUDE_DIR ${BAE_SDL3_TTF_INCLUDE_DIR})
set(ZEFIDI_SDL_TTF_LIBRARY ${BAE_SDL3_TTF_LIBRARY})
elseif(BAE_PLATFORM STREQUAL "SDL2"
AND BAE_SDL2_INCLUDE_DIR AND BAE_SDL2_LIBRARY
AND BAE_SDL2_TTF_INCLUDE_DIR AND BAE_SDL2_TTF_LIBRARY)
set(ZEFIDI_SDL_BACKEND_AVAILABLE ON)
set(ZEFIDI_SDL_VERSION "SDL2")
set(ZEFIDI_SDL_INCLUDE_DIR ${BAE_SDL2_INCLUDE_DIR})
set(ZEFIDI_SDL_LIBRARY ${BAE_SDL2_LIBRARY})
set(ZEFIDI_SDL_TTF_INCLUDE_DIR ${BAE_SDL2_TTF_INCLUDE_DIR})
set(ZEFIDI_SDL_TTF_LIBRARY ${BAE_SDL2_TTF_LIBRARY})
elseif(BAE_SDL3_INCLUDE_DIR AND BAE_SDL3_LIBRARY
AND BAE_SDL3_TTF_INCLUDE_DIR AND BAE_SDL3_TTF_LIBRARY)
set(ZEFIDI_SDL_BACKEND_AVAILABLE ON)
set(ZEFIDI_SDL_VERSION "SDL3")
set(ZEFIDI_SDL_INCLUDE_DIR ${BAE_SDL3_INCLUDE_DIR})
set(ZEFIDI_SDL_LIBRARY ${BAE_SDL3_LIBRARY})
set(ZEFIDI_SDL_TTF_INCLUDE_DIR ${BAE_SDL3_TTF_INCLUDE_DIR})
set(ZEFIDI_SDL_TTF_LIBRARY ${BAE_SDL3_TTF_LIBRARY})
elseif(BAE_SDL2_INCLUDE_DIR AND BAE_SDL2_LIBRARY
AND BAE_SDL2_TTF_INCLUDE_DIR AND BAE_SDL2_TTF_LIBRARY)
set(ZEFIDI_SDL_BACKEND_AVAILABLE ON)
set(ZEFIDI_SDL_VERSION "SDL2")
set(ZEFIDI_SDL_INCLUDE_DIR ${BAE_SDL2_INCLUDE_DIR})
set(ZEFIDI_SDL_LIBRARY ${BAE_SDL2_LIBRARY})
set(ZEFIDI_SDL_TTF_INCLUDE_DIR ${BAE_SDL2_TTF_INCLUDE_DIR})
set(ZEFIDI_SDL_TTF_LIBRARY ${BAE_SDL2_TTF_LIBRARY})
endif()
if(ZEFIDI_SDL_BACKEND_AVAILABLE)
message(STATUS "zefidi will use ${ZEFIDI_SDL_VERSION} independently of BAE_PLATFORM=${BAE_PLATFORM}.")
else()
message(STATUS "No usable SDL2/SDL3 + SDL_ttf combination was found for zefidi.")
endif()
endif()
set(BAE_ZEFIDI_AVAILABLE OFF)
if(ZEFIDI_SDL_BACKEND_AVAILABLE)
set(BAE_ZEFIDI_AVAILABLE ON)
endif()
set(BAE_PLAYBAE_PLATFORM_AVAILABLE ON)
if(BAE_PLATFORM STREQUAL "Dummy" OR BAE_PLATFORM STREQUAL "Ansi")
set(BAE_PLAYBAE_PLATFORM_AVAILABLE OFF)
endif()
set(NEOBAE_SOURCES
${BAE_PLATFORM_SOURCE}
neobae/src/BAE_Source/Common/BAE_Override.c
neobae/src/BAE_Source/Common/DriverTools.c
neobae/src/BAE_Source/Common/GenAudioStreams.c
neobae/src/BAE_Source/Common/GenCache.c
neobae/src/BAE_Source/Common/GenChorus.c
neobae/src/BAE_Source/Common/GenFiltersReverbU3232.c
neobae/src/BAE_Source/Common/GenInterp2ReverbU3232.c
neobae/src/BAE_Source/Common/GenOutput.c
neobae/src/BAE_Source/Common/GenPatch.c
neobae/src/BAE_Source/Common/GenReverb.c
neobae/src/BAE_Source/Common/GenReverbNew.c
neobae/src/BAE_Source/Common/GenReverbNeo.c
neobae/src/BAE_Source/Common/GenRingtone.c
neobae/src/BAE_Source/Common/GenRMI.c
neobae/src/BAE_Source/Common/GenSample.c
neobae/src/BAE_Source/Common/GenSeq.c
neobae/src/BAE_Source/Common/GenSeqTools.c
neobae/src/BAE_Source/Common/GenSetup.c
neobae/src/BAE_Source/Common/GenSong.c
neobae/src/BAE_Source/Common/GenSoundFiles.c
neobae/src/BAE_Source/Common/GenSynth.c
neobae/src/BAE_Source/Common/GenSynthFiltersSimple.c
neobae/src/BAE_Source/Common/GenSynthFiltersU3232.c
neobae/src/BAE_Source/Common/GenSynthInterp2Simple.c
neobae/src/BAE_Source/Common/GenSynthInterp2U3232.c
neobae/src/BAE_Source/Common/NeoBAE.c
neobae/src/BAE_Source/Common/NewNewLZSS.c
neobae/src/BAE_Source/Common/SampleTools.c
neobae/src/BAE_Source/Common/X_API.c
neobae/src/BAE_Source/Common/X_Decompress.c
neobae/src/BAE_Source/Common/X_IMA.c
neobae/src/BAE_Source/Common/g711.c
neobae/src/BAE_Source/Common/g721.c
neobae/src/BAE_Source/Common/g723_24.c
neobae/src/BAE_Source/Common/g723_40.c
neobae/src/BAE_Source/Common/g72x.c
neobae/src/BAE_Source/Common/sha1mini.c
neobae/src/BAE_Source/Common/XFileTypes.c
neobae/src/BAE_Source/Common/X_DebugCallback.c
)
if(BAE_ENABLE_LZMA)
list(APPEND NEOBAE_SOURCES
neobae/src/BAE_Source/Common/X_LZMA.c
neobae/src/thirdparty/lzma-26.00/C/Alloc.c
neobae/src/thirdparty/lzma-26.00/C/7zAlloc.c
neobae/src/thirdparty/lzma-26.00/C/7zCrc.c
neobae/src/thirdparty/lzma-26.00/C/7zCrcOpt.c
neobae/src/thirdparty/lzma-26.00/C/7zStream.c
neobae/src/thirdparty/lzma-26.00/C/XzCrc64.c
neobae/src/thirdparty/lzma-26.00/C/XzCrc64Opt.c
neobae/src/thirdparty/lzma-26.00/C/Sha256.c
neobae/src/thirdparty/lzma-26.00/C/Sha256Opt.c
neobae/src/thirdparty/lzma-26.00/C/CpuArch.c
neobae/src/thirdparty/lzma-26.00/C/Bra.c
neobae/src/thirdparty/lzma-26.00/C/Bra86.c
neobae/src/thirdparty/lzma-26.00/C/BraIA64.c
neobae/src/thirdparty/lzma-26.00/C/Delta.c
neobae/src/thirdparty/lzma-26.00/C/LzmaDec.c
neobae/src/thirdparty/lzma-26.00/C/Lzma2Dec.c
neobae/src/thirdparty/lzma-26.00/C/LzFind.c
neobae/src/thirdparty/lzma-26.00/C/LzmaEnc.c
neobae/src/thirdparty/lzma-26.00/C/Lzma2Enc.c
neobae/src/thirdparty/lzma-26.00/C/Xz.c
neobae/src/thirdparty/lzma-26.00/C/XzDec.c
)
endif()
if(BAE_ENABLE_RMF_EDITOR)
list(APPEND NEOBAE_SOURCES neobae/src/BAE_Source/Common/BAERmfEditor.c)
endif()
if(BAE_ENABLE_SF2_CONVERTER)
list(APPEND NEOBAE_SOURCES
neobae/src/mod2rmf/mod2rmf_encoder.c
neobae/src/sf2-hsb/hsb_writer.c
neobae/src/sf2-hsb/sf2_hsb_converter.c
neobae/src/sf2-hsb/sf2_parser.c
)
endif()
if(BAE_ENABLE_SF2_SUPPORT AND BAE_ENABLE_FLUIDSYNTH)
list(APPEND NEOBAE_SOURCES neobae/src/BAE_Source/Common/GenSF2_FluidSynth.c)
endif()
if(BAE_ENABLE_XMF_SUPPORT)
list(APPEND NEOBAE_SOURCES neobae/src/BAE_Source/Common/GenXMF.c)
endif()
if(BAE_ENABLE_MTHC_SUPPORT)
list(APPEND NEOBAE_SOURCES neobae/src/mthc/mthc_decomp.c)
endif()
if(BAE_ENABLE_ADP_SUPPORT)
list(APPEND NEOBAE_SOURCES
neobae/src/adp2wav/adp2wav_decode.c
neobae/src/thirdparty/libg722/g722_decode.c
)
endif()
if(BAE_ENABLE_RETRO_RINGTONE_SUPPORT)
list(APPEND NEOBAE_SOURCES
neobae/src/BAE_Source/Common/GenRingtone.c
)
endif()
if(BAE_ENABLE_QOA_SUPPORT)
list(APPEND NEOBAE_SOURCES
neobae/src/BAE_Source/Common/XQOAFiles.c
)
endif()
if(BAE_ENABLE_BAESCRIPT)
list(APPEND NEOBAE_SOURCES
neobae/src/script/baescript.c
neobae/src/script/baescript_lexer.c
neobae/src/script/baescript_parser.c
neobae/src/script/baescript_vm.c
)
endif()
if(BAE_ENABLE_MP3_DECODER)
list(APPEND NEOBAE_SOURCES neobae/src/BAE_MPEG_Source_II/XMPEG_minimp3_wrapper.c)
endif()
if(BAE_ENABLE_MP3_ENCODER OR BAE_ENABLE_MP3_DECODER)
list(APPEND NEOBAE_SOURCES neobae/src/BAE_MPEG_Source_II/XMPEGFilesSun.c)
endif()
if(BAE_ENABLE_MP3_ENCODER)
list(APPEND NEOBAE_SOURCES neobae/src/BAE_MPEG_Source_II/XMPEG_lame_encoder.cpp)
if (NOT NEOBAE_EXTERNAL_CODECS)
list(APPEND NEOBAE_SOURCES
neobae/src/thirdparty/lame-3.100-slim/libmp3lame/VbrTag.c
neobae/src/thirdparty/lame-3.100-slim/libmp3lame/bitstream.c
neobae/src/thirdparty/lame-3.100-slim/libmp3lame/encoder.c
neobae/src/thirdparty/lame-3.100-slim/libmp3lame/fft.c
neobae/src/thirdparty/lame-3.100-slim/libmp3lame/gain_analysis.c
neobae/src/thirdparty/lame-3.100-slim/libmp3lame/id3tag.c
neobae/src/thirdparty/lame-3.100-slim/libmp3lame/lame.c
neobae/src/thirdparty/lame-3.100-slim/libmp3lame/newmdct.c
neobae/src/thirdparty/lame-3.100-slim/libmp3lame/presets.c
neobae/src/thirdparty/lame-3.100-slim/libmp3lame/psymodel.c
neobae/src/thirdparty/lame-3.100-slim/libmp3lame/quantize.c
neobae/src/thirdparty/lame-3.100-slim/libmp3lame/quantize_pvt.c
neobae/src/thirdparty/lame-3.100-slim/libmp3lame/reservoir.c
neobae/src/thirdparty/lame-3.100-slim/libmp3lame/set_get.c
neobae/src/thirdparty/lame-3.100-slim/libmp3lame/tables.c
neobae/src/thirdparty/lame-3.100-slim/libmp3lame/takehiro.c
neobae/src/thirdparty/lame-3.100-slim/libmp3lame/util.c
neobae/src/thirdparty/lame-3.100-slim/libmp3lame/vbrquantize.c
neobae/src/thirdparty/lame-3.100-slim/libmp3lame/version.c
neobae/src/thirdparty/lame-3.100-slim/libmp3lame/mpglib_interface.c
)
endif()
endif()
if(BAE_ENABLE_FLAC_ENCODER OR BAE_ENABLE_FLAC_DECODER OR BAE_ENABLE_VORBIS_ENCODER OR BAE_ENABLE_VORBIS_DECODER OR BAE_ENABLE_OPUS_ENCODER OR BAE_ENABLE_OPUS_DECODER)
if (NOT NEOBAE_EXTERNAL_CODECS)
list(APPEND NEOBAE_SOURCES
neobae/src/thirdparty/libogg/src/bitwise.c
neobae/src/thirdparty/libogg/src/framing.c
)
endif()
endif()
if(BAE_ENABLE_FLAC_ENCODER OR BAE_ENABLE_FLAC_DECODER)
if (NOT NEOBAE_EXTERNAL_CODECS)
list(APPEND NEOBAE_SOURCES
neobae/src/thirdparty/flac/src/libFLAC/bitmath.c
neobae/src/thirdparty/flac/src/libFLAC/bitreader.c
neobae/src/thirdparty/flac/src/libFLAC/bitwriter.c
neobae/src/thirdparty/flac/src/libFLAC/cpu.c
neobae/src/thirdparty/flac/src/libFLAC/crc.c
neobae/src/thirdparty/flac/src/libFLAC/fixed.c
neobae/src/thirdparty/flac/src/libFLAC/float.c
neobae/src/thirdparty/flac/src/libFLAC/format.c
neobae/src/thirdparty/flac/src/libFLAC/lpc.c
neobae/src/thirdparty/flac/src/libFLAC/md5.c
neobae/src/thirdparty/flac/src/libFLAC/memory.c
neobae/src/thirdparty/flac/src/libFLAC/metadata_iterators.c
neobae/src/thirdparty/flac/src/libFLAC/metadata_object.c
neobae/src/thirdparty/flac/src/libFLAC/stream_decoder.c
neobae/src/thirdparty/flac/src/libFLAC/stream_encoder.c
neobae/src/thirdparty/flac/src/libFLAC/stream_encoder_framing.c
neobae/src/thirdparty/flac/src/libFLAC/window.c
neobae/src/thirdparty/flac/src/libFLAC/ogg_decoder_aspect.c
neobae/src/thirdparty/flac/src/libFLAC/ogg_encoder_aspect.c
neobae/src/thirdparty/flac/src/libFLAC/ogg_helper.c
neobae/src/thirdparty/flac/src/libFLAC/ogg_mapping.c
)
if(WIN32)
list(APPEND NEOBAE_SOURCES neobae/src/thirdparty/flac/src/share/win_utf8_io/win_utf8_io.c)
endif()
endif()
endif()
if(BAE_ENABLE_VORBIS_ENCODER OR BAE_ENABLE_VORBIS_DECODER)
if (NEOBAE_EXTERNAL_CODECS)
list(APPEND NEOBAE_SOURCES
neobae/src/thirdparty/libvorbis/lib/mdct.c
neobae/src/thirdparty/libvorbis/lib/smallft.c
neobae/src/thirdparty/libvorbis/lib/block.c
neobae/src/thirdparty/libvorbis/lib/envelope.c
neobae/src/thirdparty/libvorbis/lib/window.c
neobae/src/thirdparty/libvorbis/lib/lsp.c
neobae/src/thirdparty/libvorbis/lib/lpc.c
neobae/src/thirdparty/libvorbis/lib/analysis.c
neobae/src/thirdparty/libvorbis/lib/synthesis.c
neobae/src/thirdparty/libvorbis/lib/psy.c
neobae/src/thirdparty/libvorbis/lib/info.c
neobae/src/thirdparty/libvorbis/lib/floor1.c
neobae/src/thirdparty/libvorbis/lib/floor0.c
neobae/src/thirdparty/libvorbis/lib/res0.c
neobae/src/thirdparty/libvorbis/lib/mapping0.c
neobae/src/thirdparty/libvorbis/lib/registry.c
neobae/src/thirdparty/libvorbis/lib/codebook.c
neobae/src/thirdparty/libvorbis/lib/sharedbook.c
neobae/src/thirdparty/libvorbis/lib/lookup.c
neobae/src/thirdparty/libvorbis/lib/bitrate.c
neobae/src/thirdparty/libvorbis/lib/vorbisfile.c
)
endif()
if(BAE_ENABLE_VORBIS_ENCODER AND NEOBAE_EXTERNAL_CODECS)
list(APPEND NEOBAE_SOURCES neobae/src/thirdparty/libvorbis/lib/vorbisenc.c)
endif()
list(APPEND NEOBAE_SOURCES neobae/src/BAE_Source/Common/XVorbisFiles.c)
endif()
if(BAE_ENABLE_OPUS_ENCODER OR BAE_ENABLE_OPUS_DECODER)
list(APPEND NEOBAE_SOURCES
neobae/src/BAE_Source/Common/XOpusFiles.c
)
if (NOT NEOBAE_EXTERNAL_CODECS)
list(APPEND NEOBAE_SOURCES
neobae/src/thirdparty/opus/src/opus.c
neobae/src/thirdparty/opus/src/opus_decoder.c
neobae/src/thirdparty/opus/src/opus_encoder.c
neobae/src/thirdparty/opus/src/extensions.c
neobae/src/thirdparty/opus/src/opus_multistream.c
neobae/src/thirdparty/opus/src/opus_multistream_encoder.c
neobae/src/thirdparty/opus/src/opus_multistream_decoder.c
neobae/src/thirdparty/opus/src/repacketizer.c
neobae/src/thirdparty/opus/src/opus_projection_encoder.c
neobae/src/thirdparty/opus/src/opus_projection_decoder.c
neobae/src/thirdparty/opus/src/mapping_matrix.c
neobae/src/thirdparty/opus/src/analysis.c
neobae/src/thirdparty/opus/src/mlp.c
neobae/src/thirdparty/opus/src/mlp_data.c
neobae/src/thirdparty/opus/celt/bands.c
neobae/src/thirdparty/opus/celt/celt.c
neobae/src/thirdparty/opus/celt/celt_encoder.c
neobae/src/thirdparty/opus/celt/celt_decoder.c
neobae/src/thirdparty/opus/celt/cwrs.c
neobae/src/thirdparty/opus/celt/entcode.c
neobae/src/thirdparty/opus/celt/entdec.c
neobae/src/thirdparty/opus/celt/entenc.c
neobae/src/thirdparty/opus/celt/kiss_fft.c
neobae/src/thirdparty/opus/celt/laplace.c
neobae/src/thirdparty/opus/celt/mathops.c
neobae/src/thirdparty/opus/celt/mdct.c
neobae/src/thirdparty/opus/celt/modes.c
neobae/src/thirdparty/opus/celt/pitch.c
neobae/src/thirdparty/opus/celt/celt_lpc.c
neobae/src/thirdparty/opus/celt/quant_bands.c
neobae/src/thirdparty/opus/celt/rate.c
neobae/src/thirdparty/opus/celt/vq.c
neobae/src/thirdparty/opus/silk/CNG.c
neobae/src/thirdparty/opus/silk/code_signs.c
neobae/src/thirdparty/opus/silk/init_decoder.c
neobae/src/thirdparty/opus/silk/decode_core.c
neobae/src/thirdparty/opus/silk/decode_frame.c
neobae/src/thirdparty/opus/silk/decode_parameters.c
neobae/src/thirdparty/opus/silk/decode_indices.c
neobae/src/thirdparty/opus/silk/decode_pulses.c
neobae/src/thirdparty/opus/silk/decoder_set_fs.c
neobae/src/thirdparty/opus/silk/dec_API.c
neobae/src/thirdparty/opus/silk/enc_API.c
neobae/src/thirdparty/opus/silk/encode_indices.c
neobae/src/thirdparty/opus/silk/encode_pulses.c
neobae/src/thirdparty/opus/silk/gain_quant.c
neobae/src/thirdparty/opus/silk/interpolate.c
neobae/src/thirdparty/opus/silk/LP_variable_cutoff.c
neobae/src/thirdparty/opus/silk/NLSF_decode.c
neobae/src/thirdparty/opus/silk/NSQ.c
neobae/src/thirdparty/opus/silk/NSQ_del_dec.c
neobae/src/thirdparty/opus/silk/PLC.c
neobae/src/thirdparty/opus/silk/shell_coder.c
neobae/src/thirdparty/opus/silk/tables_gain.c
neobae/src/thirdparty/opus/silk/tables_LTP.c
neobae/src/thirdparty/opus/silk/tables_NLSF_CB_NB_MB.c
neobae/src/thirdparty/opus/silk/tables_NLSF_CB_WB.c
neobae/src/thirdparty/opus/silk/tables_other.c
neobae/src/thirdparty/opus/silk/tables_pitch_lag.c
neobae/src/thirdparty/opus/silk/tables_pulses_per_block.c
neobae/src/thirdparty/opus/silk/VAD.c
neobae/src/thirdparty/opus/silk/control_audio_bandwidth.c
neobae/src/thirdparty/opus/silk/quant_LTP_gains.c