2022-07-19 05:26:05 +08:00
|
|
|
vcpkg_from_github(
|
2019-02-17 06:42:47 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2022-07-19 05:26:05 +08:00
|
|
|
REPO libsdl-org/SDL_mixer
|
2023-02-11 03:17:29 +08:00
|
|
|
REF "release-${VERSION}"
|
2024-02-08 14:26:27 +08:00
|
|
|
SHA512 e4c9a4418725ce019bb62216c8fd484cf04b34e2099af633d4c84e0e558fe6ba1921e791c5dde319266ffe3a1237f887871c819a249a8df7e9440c36fce181da
|
2023-02-11 03:17:29 +08:00
|
|
|
PATCHES
|
2024-02-08 14:26:27 +08:00
|
|
|
fix-pkg-prefix.patch
|
2019-02-17 06:42:47 +08:00
|
|
|
)
|
2017-04-10 17:00:52 +08:00
|
|
|
|
2022-07-19 05:26:05 +08:00
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-09-14 11:25:53 +08:00
|
|
|
FEATURES
|
2023-03-22 03:40:45 +08:00
|
|
|
fluidsynth SDL2MIXER_MIDI
|
2022-07-19 05:26:05 +08:00
|
|
|
fluidsynth SDL2MIXER_MIDI_FLUIDSYNTH
|
2023-03-22 03:40:45 +08:00
|
|
|
libflac SDL2MIXER_FLAC
|
2022-07-19 05:26:05 +08:00
|
|
|
libflac SDL2MIXER_FLAC_LIBFLAC
|
2023-02-11 03:17:29 +08:00
|
|
|
libmodplug SDL2MIXER_MOD
|
2022-07-19 05:26:05 +08:00
|
|
|
libmodplug SDL2MIXER_MOD_MODPLUG
|
2023-03-22 03:40:45 +08:00
|
|
|
mpg123 SDL2MIXER_MP3
|
2022-07-19 05:26:05 +08:00
|
|
|
mpg123 SDL2MIXER_MP3_MPG123
|
2024-03-20 06:07:02 +08:00
|
|
|
wavpack SDL2MIXER_WAVPACK
|
|
|
|
wavpack SDL2MIXER_WAVPACK_DSD
|
2022-07-19 05:26:05 +08:00
|
|
|
opusfile SDL2MIXER_OPUS
|
2019-09-24 04:49:38 +08:00
|
|
|
)
|
|
|
|
|
2023-03-22 03:40:45 +08:00
|
|
|
if("fluidsynth" IN_LIST FEATURES)
|
|
|
|
vcpkg_find_acquire_program(PKGCONFIG)
|
|
|
|
list(APPEND EXTRA_OPTIONS "-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}")
|
2023-02-11 03:17:29 +08:00
|
|
|
endif()
|
|
|
|
|
2024-02-09 14:46:35 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
|
|
|
|
|
2021-09-14 11:25:53 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-09-24 04:49:38 +08:00
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
2023-03-22 03:40:45 +08:00
|
|
|
${EXTRA_OPTIONS}
|
2022-07-19 05:26:05 +08:00
|
|
|
-DSDL2MIXER_VENDORED=OFF
|
2022-10-12 16:15:24 +08:00
|
|
|
-DSDL2MIXER_SAMPLES=OFF
|
2023-02-11 03:17:29 +08:00
|
|
|
-DSDL2MIXER_DEPS_SHARED=OFF
|
|
|
|
-DSDL2MIXER_OPUS_SHARED=OFF
|
|
|
|
-DSDL2MIXER_VORBIS_VORBISFILE_SHARED=OFF
|
2023-03-22 03:40:45 +08:00
|
|
|
-DSDL2MIXER_VORBIS="VORBISFILE"
|
|
|
|
-DSDL2MIXER_FLAC_DRFLAC=OFF
|
|
|
|
-DSDL2MIXER_MIDI_NATIVE=OFF
|
|
|
|
-DSDL2MIXER_MIDI_TIMIDITY=OFF
|
|
|
|
-DSDL2MIXER_MP3_DRMP3=OFF
|
2024-02-09 14:46:35 +08:00
|
|
|
-DSDL2MIXER_MOD_XMP_SHARED=${BUILD_SHARED}
|
2024-03-20 06:07:02 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
SDL2MIXER_MP3_DRMP3
|
2019-02-17 06:42:47 +08:00
|
|
|
)
|
2017-04-10 17:00:52 +08:00
|
|
|
|
2021-09-14 11:25:53 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-04-10 17:00:52 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2022-07-19 05:26:05 +08:00
|
|
|
vcpkg_cmake_config_fixup(
|
|
|
|
PACKAGE_NAME "SDL2_mixer"
|
|
|
|
CONFIG_PATH "lib/cmake/SDL2_mixer"
|
|
|
|
)
|
2021-12-01 07:29:54 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2017-04-10 17:00:52 +08:00
|
|
|
|
2024-03-16 09:40:20 +08:00
|
|
|
if(NOT VCPKG_BUILD_TYPE)
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/SDL2_mixer.pc" "-lSDL2_mixer" "-lSDL2_mixerd")
|
|
|
|
endif()
|
|
|
|
|
2022-07-19 05:26:05 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2021-09-14 11:25:53 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2019-03-27 00:57:16 +08:00
|
|
|
|
2022-08-05 01:51:24 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2023-02-11 03:17:29 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|