forked from libsdl-org/SDL_mixer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sdl2_mixer-config.cmake.in
150 lines (128 loc) · 5.47 KB
/
sdl2_mixer-config.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
145
146
147
148
149
150
# sdl2_mixer cmake project-config input for ./configure scripts
include(FeatureSummary)
set_package_properties(SDL2_mixer PROPERTIES
URL "https://www.libsdl.org/projects/SDL_mixer/"
DESCRIPTION "SDL_mixer is a sample multi-channel audio mixer library"
)
set(SDL2_mixer_FOUND TRUE)
set(SDL2MIXER_VENDORED 0)
set(SDL2MIXER_CMD @SDL2MIXER_CMD@)
set(SDL2MIXER_FLAC_LIBFLAC @SDL2MIXER_FLAC_LIBFLAC@)
set(SDL2MIXER_FLAC_DRFLAC @SDL2MIXER_FLAC_DRFLAC@)
if(SDL2MIXER_FLAC_LIBFLAC OR SDL2MIXER_FLAC_DRFLAC)
set(SDL2MIXER_FLAC 1)
else()
set(SDL2MIXER_FLAC 0)
endif()
set(SDL2MIXER_GME @SDL2MIXER_GME@)
set(SDL2MIXER_MOD_MODPLUG @SDL2MIXER_MOD_MODPLUG@)
set(SDL2MIXER_MOD_XMP @SDL2MIXER_MOD_XMP@)
set(SDL2MIXER_MOD_XMP_LITE @SDL2MIXER_MOD_XMP_LITE@)
if(SDL2MIXER_MOD_MODPLUG OR SDL2MIXER_MOD_XMP OR SDL2MIXER_MOD_XMP_LITE)
set(SDL2MIXER_MOD 1)
else()
set(SDL2MIXER_MOD 0)
endif()
set(SDL2MIXER_MP3_MINIMP3 @SDL2MIXER_MP3_MINIMP3@)
set(SDL2MIXER_MP3_MPG123 @SDL2MIXER_MP3_MPG123@)
if(SDL2MIXER_MP3_MINIMP3 OR SDL2MIXER_MP3_MPG123)
set(SDL2MIXER_MP3 1)
else()
set(SDL2MIXER_MP3 0)
endif()
set(SDL2MIXER_MIDI_FLUIDSYNTH @SDL2MIXER_MIDI_FLUIDSYNTH@)
set(SDL2MIXER_MIDI_NATIVE @SDL2MIXER_MIDI_NATIVE@)
set(SDL2MIXER_MIDI_TIMIDITY @SDL2MIXER_MIDI_TIMIDITY@)
if(SDL2MIXER_MIDI_FLUIDSYNTH OR SDL2MIXER_MIDI_NATIVE OR SDL2MIXER_MIDI_TIMIDITY)
set(SDL2MIXER_MIDI 1)
else()
set(SDL2MIXER_MIDI 0)
endif()
set(SDL2MIXER_OPUS @SDL2MIXER_OPUS@)
set(SDL2MIXER_VORBIS)
set(SDL2MIXER_VORBIS_STB @SDL2MIXER_VORBIS_STB@)
set(SDL2MIXER_VORBIS_VORBISFILE @SDL2MIXER_VORBIS_VORBISFILE@)
set(SDL2MIXER_VORBIS_TREMOR @SDL2MIXER_VORBIS_TREMOR@)
if(SDL2MIXER_VORBIS_STB)
set(SDL2MIXER_VORBIS STB)
endif()
if(SDL2MIXER_VORBIS_VORBISFILE)
set(SDL2MIXER_VORBIS VORBISFILE)
endif()
if(SDL2MIXER_VORBIS_TREMOR)
set(SDL2MIXER_VORBIS TREMOR)
endif()
set(SDL2MIXER_WAVE @SDL2MIXER_WAVE@)
set(SDL2MIXER_WAVPACK @SDL2MIXER_WAVPACK@)
set(SDL2MIXER_SDL2_REQUIRED_VERSION @SDL_VERSION@)
get_filename_component(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_DIR} REALPATH)
get_filename_component(prefix "${CMAKE_CURRENT_LIST_DIR}/@cmake_prefix_relpath@" ABSOLUTE)
set(exec_prefix "@exec_prefix@")
set(bindir "@bindir@")
set(includedir "@includedir@")
set(libdir "@libdir@")
set(_sdl2mixer_extra_static_libraries "@MIXER_LIBS@ @PC_LIBS@")
string(STRIP "${_sdl2mixer_extra_static_libraries}" _sdl2mixer_extra_static_libraries)
set(_sdl2mixer_bindir "${bindir}")
set(_sdl2mixer_libdir "${libdir}")
set(_sdl2mixer_incdir "${includedir}/SDL2")
# Convert _sdl2mixer_extra_static_libraries to list and keep only libraries
string(REGEX MATCHALL "(-[lm]([-a-zA-Z0-9._]+))|(-Wl,[^ ]*framework[^ ]*)" _sdl2mixer_extra_static_libraries "${_sdl2mixer_extra_static_libraries}")
string(REGEX REPLACE "^-l" "" _sdl2mixer_extra_static_libraries "${_sdl2mixer_extra_static_libraries}")
string(REGEX REPLACE ";-l" ";" _sdl2mixer_extra_static_libraries "${_sdl2mixer_extra_static_libraries}")
unset(prefix)
unset(exec_prefix)
unset(bindir)
unset(includedir)
unset(libdir)
include(CMakeFindDependencyMacro)
if(NOT TARGET SDL2_mixer::SDL2_mixer)
if(WIN32)
set(_sdl2mixer_dll "${_sdl2mixer_bindir}/SDL2_mixer.dll")
set(_sdl2mixer_imp "${_sdl2mixer_libdir}/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2_mixer.dll${CMAKE_STATIC_LIBRARY_SUFFIX}")
if(EXISTS "${_sdl2mixer_dll}" AND EXISTS "${_sdl2mixer_imp}")
add_library(SDL2_mixer::SDL2_mixer SHARED IMPORTED)
set_target_properties(SDL2_mixer::SDL2_mixer
PROPERTIES
IMPORTED_LOCATION "${_sdl2mixer_dll}"
IMPORTED_IMPLIB "${_sdl2mixer_imp}"
)
endif()
unset(_sdl2mixer_dll)
unset(_sdl2mixer_imp)
else()
set(_sdl2mixer_shl "${_sdl2mixer_libdir}/${CMAKE_SHARED_LIBRARY_PREFIX}SDL2_mixer${CMAKE_SHARED_LIBRARY_SUFFIX}")
if(EXISTS "${_sdl2mixer_shl}")
add_library(SDL2_mixer::SDL2_mixer SHARED IMPORTED)
set_target_properties(SDL2_mixer::SDL2_mixer
PROPERTIES
IMPORTED_LOCATION "${_sdl2mixer_shl}"
)
endif()
endif()
if(TARGET SDL2_mixer::SDL2_mixer)
set_target_properties(SDL2_mixer::SDL2_mixer
PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_sdl2mixer_incdir}"
COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
INTERFACE_SDL2_SHARED "ON"
)
endif()
endif()
if(NOT TARGET SDL2_mixer::SDL2_mixer-static)
set(_sdl2mixer_stl "${_sdl2mixer_libdir}/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2_mixer${CMAKE_STATIC_LIBRARY_SUFFIX}")
if(EXISTS "${_sdl2mixer_stl}")
add_library(SDL2_mixer::SDL2_mixer-static STATIC IMPORTED)
set_target_properties(SDL2_mixer::SDL2_mixer-static
PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_sdl2mixer_incdir}"
IMPORTED_LOCATION "${_sdl2mixer_stl}"
INTERFACE_LINK_LIBRARIES "${_sdl2mixer_extra_static_libraries}"
)
endif()
unset(_sdl2mixer_stl)
endif()
unset(_sdl2mixer_extra_static_libraries)
unset(_sdl2mixer_bindir)
unset(_sdl2mixer_libdir)
unset(_sdl2mixer_incdir)