-
Notifications
You must be signed in to change notification settings - Fork 257
/
FluidSynthConfig.cmake.in
144 lines (117 loc) · 4.69 KB
/
FluidSynthConfig.cmake.in
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
# Audio / MIDI driver support
set(FLUIDSYNTH_SUPPORT_ALSA @ALSA_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_COREAUDIO @COREAUDIO_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_COREMIDI @COREMIDI_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_DART @DART_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_DSOUND @DSOUND_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_JACK @JACK_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_KAI @KAI_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_MIDISHARE @MIDISHARE_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_OBOE @OBOE_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_OPENSLES @OPENSLES_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_OSS @OSS_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_PIPEWIRE @PIPEWIRE_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_PORTAUDIO @PORTAUDIO_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_PULSE @PULSE_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_SDL2 @SDL2_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_WASAPI @WASAPI_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_WAVEOUT @WAVEOUT_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_WINMIDI @WINMIDI_SUPPORT@)
# Files support
set(FLUIDSYNTH_SUPPORT_DLS @LIBINSTPATCH_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_LIBINSTPATCH @LIBINSTPATCH_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_LIBSNDFILE @LIBSNDFILE_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_SF3 @LIBSNDFILE_HASVORBIS@)
# Miscrellaneous support
set(FLUIDSYNTH_SUPPORT_DBUS @DBUS_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_GETOPT @HAVE_GETOPT_H@)
set(FLUIDSYNTH_SUPPORT_IPV6 @IPV6_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_LADSPA @LADSPA_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_NETWORK @NETWORK_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_READLINE @READLINE_SUPPORT@)
set(FLUIDSYNTH_SUPPORT_SYSTEMD @SYSTEMD_SUPPORT@)
# Extra info
set(FLUIDSYNTH_IS_SHARED @BUILD_SHARED_LIBS@)
set(FLUIDSYNTH_SUPPORT_COVERAGE @ENABLE_COVERAGE@)
set(FLUIDSYNTH_SUPPORT_FLOAT @WITH_FLOAT@)
set(FLUIDSYNTH_SUPPORT_FPECHECK @ENABLE_FPECHECK@)
set(FLUIDSYNTH_SUPPORT_FPETRAP @ENABLE_TRAPONFPE@)
set(FLUIDSYNTH_SUPPORT_OPENMP @HAVE_OPENMP@)
set(FLUIDSYNTH_SUPPORT_PROFILING @WITH_PROFILING@)
set(FLUIDSYNTH_SUPPORT_THREADS @ENABLE_MIXER_THREADS@)
set(FLUIDSYNTH_SUPPORT_UBSAN @ENABLE_UBSAN@)
# Only load dependencies on static builds
if(NOT FLUIDSYNTH_IS_SHARED)
# Allows CMake to use the additional modules
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
# Make searching for packages easier on VCPKG
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.15 AND VCPKG_TOOLCHAIN)
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
endif()
# Load the pkg-config helpers
include(PkgConfigHelpers)
# Check the system has a separated math library
find_library(HAS_LIBM NAMES "m" NO_CACHE)
if(HAS_LIBM)
set(MATH_LIBRARY "m")
endif(HAS_LIBM)
# Load find_dependency macro
include(CMakeFindDependencyMacro)
# Mandatory dependencies
if(NOT TARGET Threads::Threads)
find_dependency(Threads)
endif()
if(NOT TARGET GLib2::glib-2 OR NOT TARGET GLib2::gthread-2)
find_dependency(GLib2 @GLIB2_MINUMUM_VERSION@)
endif()
# Optional dependencies
if(FLUIDSYNTH_SUPPORT_ALSA AND NOT TARGET ALSA::ALSA)
find_dependency(ALSA @ALSA_MINIMUM_VERSION@)
endif()
if(FLUIDSYNTH_SUPPORT_DBUS AND NOT TARGET dbus-1)
find_dependency(DBus1 @DBUS_MINIMUM_VERSION@)
endif()
if(FLUIDSYNTH_SUPPORT_JACK AND NOT TARGET Jack::Jack)
find_dependency(Jack)
endif()
if(FLUIDSYNTH_SUPPORT_LADSPA AND NOT TARGET GLib2::gmodule-2)
message(WARN "LADSPA support was built in but gmodule could not be found.")
endif()
if(FLUIDSYNTH_SUPPORT_LIBINSTPATCH AND NOT TARGET InstPatch::libinstpatch)
find_dependency(InstPatch @LIBINSTPATCH_MINIMUM_VERSION@)
endif()
if(FLUIDSYNTH_SUPPORT_LIBSNDFILE AND NOT TARGET SndFile::sndfile)
find_dependency(SndFile @LIBSNDFILE_MINIMUM_VERSION@)
endif()
if(FLUIDSYNTH_SUPPORT_MIDISHARE AND NOT TARGET MidiShare::MidiShare)
find_dependency(MidiShare)
endif()
if(FLUIDSYNTH_SUPPORT_OBOE AND NOT TARGET oboe::oboe)
find_dependency(oboe)
endif()
if(FLUIDSYNTH_SUPPORT_OPENMP AND NOT TARGET OpenMP::OpenMP_C)
find_dependency(OpenMP COMPONENTS C)
endif()
if(FLUIDSYNTH_SUPPORT_OPENSLES AND NOT TARGET OpenSLES::OpenSLES)
find_dependency(OpenSLES)
endif()
if(FLUIDSYNTH_SUPPORT_PIPEWIRE AND NOT TARGET PipeWire::PipeWire)
find_dependency(PipeWire @PIPEWIRE_MINIMUM_VERSION@)
endif()
if(FLUIDSYNTH_SUPPORT_PORTAUDIO AND NOT TARGET PortAudio::PortAudio)
find_dependency(PortAudio @PORTAUDIO_MINIMUM_VERSION@)
endif()
if(FLUIDSYNTH_SUPPORT_READLINE AND NOT TARGET Readline::Readline)
find_dependency(Readline)
endif()
if(FLUIDSYNTH_SUPPORT_SDL2 AND NOT TARGET SDL2::SDL2)
find_dependency(SDL2)
endif()
if(FLUIDSYNTH_SUPPORT_SYSTEMD AND NOT Systemd::libsystemd)
find_dependency(Systemd)
endif()
# Restore the module path
list(REMOVE_ITEM CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
endif()
# finally, include the targets file
include("${CMAKE_CURRENT_LIST_DIR}/FluidSynthTargets.cmake")