mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 11:19:00 +08:00
Move SDL2_mixer optional dependencies to features (#5565)
This commit is contained in:
parent
2e8c0ca34d
commit
41a9614308
@ -1,4 +1,20 @@
|
||||
Source: sdl2-mixer
|
||||
Version: 2.0.2-5
|
||||
Version: 2.0.2-6
|
||||
Description: Multi-channel audio mixer library for SDL.
|
||||
Build-Depends: sdl2, libflac, mpg123, libmodplug, libvorbis
|
||||
Build-Depends: sdl2
|
||||
|
||||
Feature: libflac
|
||||
Description: Support for FLAC audio format.
|
||||
Build-Depends: libflac
|
||||
|
||||
Feature: mpg123
|
||||
Description: Support for MP3 audio format.
|
||||
Build-Depends: mpg123
|
||||
|
||||
Feature: libmodplug
|
||||
Description: Support for MOD audio format.
|
||||
Build-Depends: libmodplug
|
||||
|
||||
Feature: libvorbis
|
||||
Description: Support for OGG Vorbis audio format.
|
||||
Build-Depends: libvorbis
|
||||
|
@ -13,14 +13,34 @@ vcpkg_extract_source_archive_ex(
|
||||
)
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
set(USE_MP3 OFF)
|
||||
if("mpg123" IN_LIST FEATURES)
|
||||
set(USE_MP3 ON)
|
||||
endif()
|
||||
|
||||
set(USE_FLAC OFF)
|
||||
if("libflac" IN_LIST FEATURES)
|
||||
set(USE_FLAC ON)
|
||||
endif()
|
||||
|
||||
set(USE_MOD OFF)
|
||||
if("libmodplug" IN_LIST FEATURES)
|
||||
set(USE_MOD ON)
|
||||
endif()
|
||||
|
||||
set(USE_OGGVORBIS OFF)
|
||||
if("libvorbis" IN_LIST FEATURES)
|
||||
set(USE_OGGVORBIS ON)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DSDL_MIXER_ENABLE_MP3=ON # mpg123
|
||||
-DSDL_MIXER_ENABLE_FLAC=ON # libflac
|
||||
-DSDL_MIXER_ENABLE_MOD=ON # libmodplug
|
||||
-DSDL_MIXER_ENABLE_OGGVORBIS=ON # libvorbis
|
||||
-DSDL_MIXER_ENABLE_MP3=${USE_MP3} # mpg123
|
||||
-DSDL_MIXER_ENABLE_FLAC=${USE_FLAC} # libflac
|
||||
-DSDL_MIXER_ENABLE_MOD=${USE_MOD} # libmodplug
|
||||
-DSDL_MIXER_ENABLE_OGGVORBIS=${USE_OGGVORBIS} # libvorbis
|
||||
OPTIONS_DEBUG
|
||||
-DSDL_MIXER_SKIP_HEADERS=ON
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user