vcpkg/ports/sdl2-mixer/fix-missing-find-opusfile.patch
Pierre Wendling 785cbdb8ba
[sdl2-mixer] Bump to 2.6.3 (#29487)
* [sdl2-mixer] Bump to version 2.6.3

* [sdl2-mixer] Fix findFluidSynth on windows-static.

* [sdl2-mixer] vcpkg_minimum_required is not needed

* [sdl2-mixer] Control SDL2MIXER_MOD with libmodplug

If SDL2MIXER_MOD is left on when no backend is availble, CMake issues a
warning.

* [sdl2-mixer] Turn off SDL2MIXER_DEPS_SHARED

Similar issue to #28137. SDL2MIXER_OPUS_SHARED and
SDL2MIXER_VORBIS_VORBISFILE_SHARED need to be manually
turned off as they are unconditionally turned on.

* [sdl2-mixer] Set the correct vorbis backend.

Even when SDL2MIXER_VORBIS_VORBISFILE was set to ON, stb_vorbis would be
used as the default backend.

* [sdl2-mixer] Use vcpkg_install_copyright

* [sdl2-mixer] Ensure flac and mpg123 are selected.

Turn off header-only libraries when the features are selected.

* [sdl2-mixer] Patch missing call to find_dependency

This is fixed upstream but has not been included in the 2.6.x branch.

* [sdl2-mixer] Fix dependency linking.

- The FLAC target is an upstream patch.
- VCPKG's opusfile port is static-only, meaning Opus and Ogg needs to be
linked explicitly.

* [sdl2-mixer] Update baseline.

---------

Co-authored-by: MonicaLiu <v-liumonica@microsoft.com>
2023-02-10 11:17:29 -08:00

15 lines
558 B
Diff

diff --git a/SDL2_mixerConfig.cmake.in b/SDL2_mixerConfig.cmake.in
index d65a43ce..15a461d4 100644
--- a/SDL2_mixerConfig.cmake.in
+++ b/SDL2_mixerConfig.cmake.in
@@ -85,6 +85,9 @@ include(CMakeFindDependencyMacro)
find_dependency(vorbisfile)
endif()
+ if(SDL2MIXER_OPUS AND NOT SDL2MIXER_VENDORED AND NOT TARGET opusfile::opusfile)
+ find_dependency(opusfile)
+ endif()
if((NOT SDL2MIXER_VENDORED AND SDL2MIXER_MOD_MODPLUG) OR (HAIKU AND SDL2MIXER_MIDI_NATIVE))
include(CheckLanguage)
check_language(CXX)