2023-05-01 17:03:23 -05:00
|
|
|
if("pulseaudio" IN_LIST FEATURES)
|
|
|
|
message(
|
|
|
|
"${PORT} with pulseaudio feature currently requires the following from the system package manager:
|
|
|
|
libpulse-dev pulseaudio
|
|
|
|
These can be installed on Ubuntu systems via sudo apt install libpulse-dev pulseaudio"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2018-04-19 23:30:39 +01:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO FluidSynth/fluidsynth
|
2023-02-13 23:48:09 +08:00
|
|
|
REF "v${VERSION}"
|
2024-12-03 03:36:25 +03:00
|
|
|
SHA512 d01d18c42ce98d0daa4e137118fc41f0a59047013870c09bacd9014baadf747e8e73571046781e34bc03eef454f2ef12ee59cf9b2c7f9517c586c08041ebe081
|
2018-04-19 23:30:39 +01:00
|
|
|
HEAD_REF master
|
2019-08-28 05:48:58 +08:00
|
|
|
PATCHES
|
2022-07-25 21:10:23 +02:00
|
|
|
gentables.patch
|
2018-04-19 23:30:39 +01:00
|
|
|
)
|
|
|
|
|
2022-05-12 09:38:46 +10:00
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
2022-07-25 21:10:23 +02:00
|
|
|
buildtools VCPKG_BUILD_MAKE_TABLES
|
2022-05-12 09:38:46 +10:00
|
|
|
sndfile enable-libsndfile
|
2023-05-01 17:03:23 -05:00
|
|
|
pulseaudio enable-pulseaudio
|
2022-05-12 09:38:46 +10:00
|
|
|
)
|
|
|
|
|
2023-04-19 16:43:20 -04:00
|
|
|
# enable platform-specific features, force the build to fail if the required libraries are not found,
|
|
|
|
# and disable all other features to avoid system libraries to be picked up
|
|
|
|
set(WINDOWS_OPTIONS enable-dsound enable-wasapi enable-waveout enable-winmidi HAVE_MMSYSTEM_H HAVE_DSOUND_H HAVE_OBJBASE_H)
|
|
|
|
set(MACOS_OPTIONS enable-coreaudio enable-coremidi COREAUDIO_FOUND COREMIDI_FOUND)
|
|
|
|
set(LINUX_OPTIONS enable-alsa ALSA_FOUND)
|
|
|
|
set(ANDROID_OPTIONS enable-opensles OpenSLES_FOUND)
|
2024-11-01 09:22:07 +03:00
|
|
|
set(IGNORED_OPTIONS enable-coverage enable-dbus enable-floats enable-fpe-check enable-framework enable-jack
|
2023-04-19 16:43:20 -04:00
|
|
|
enable-libinstpatch enable-midishare enable-oboe enable-openmp enable-oss enable-pipewire enable-portaudio
|
2023-05-01 17:03:23 -05:00
|
|
|
enable-profiling enable-readline enable-sdl2 enable-systemd enable-trap-on-fpe enable-ubsan)
|
2023-04-19 16:43:20 -04:00
|
|
|
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
set(OPTIONS_TO_ENABLE ${WINDOWS_OPTIONS})
|
|
|
|
set(OPTIONS_TO_DISABLE ${MACOS_OPTIONS} ${LINUX_OPTIONS} ${ANDROID_OPTIONS})
|
|
|
|
elseif(VCPKG_TARGET_IS_OSX)
|
|
|
|
set(OPTIONS_TO_ENABLE ${MACOS_OPTIONS})
|
|
|
|
set(OPTIONS_TO_DISABLE ${WINDOWS_OPTIONS} ${LINUX_OPTIONS} ${ANDROID_OPTIONS})
|
|
|
|
elseif(VCPKG_TARGET_IS_LINUX)
|
|
|
|
set(OPTIONS_TO_ENABLE ${LINUX_OPTIONS})
|
|
|
|
set(OPTIONS_TO_DISABLE ${WINDOWS_OPTIONS} ${MACOS_OPTIONS} ${ANDROID_OPTIONS})
|
|
|
|
elseif(VCPKG_TARGET_IS_ANDROID)
|
|
|
|
set(OPTIONS_TO_ENABLE ${ANDROID_OPTIONS})
|
|
|
|
set(OPTIONS_TO_DISABLE ${WINDOWS_OPTIONS} ${MACOS_OPTIONS} ${LINUX_OPTIONS})
|
|
|
|
endif()
|
2021-04-15 22:53:35 +02:00
|
|
|
|
2023-04-19 16:43:20 -04:00
|
|
|
foreach(_option IN LISTS OPTIONS_TO_ENABLE)
|
|
|
|
list(APPEND ENABLED_OPTIONS "-D{_option}:BOOL=ON")
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
foreach(_option IN LISTS OPTIONS_TO_DISABLE IGNORED_OPTIONS)
|
|
|
|
list(APPEND DISABLED_OPTIONS "-D${_option}:BOOL=OFF")
|
|
|
|
endforeach()
|
2022-05-17 07:07:38 +10:00
|
|
|
|
2021-04-15 22:53:35 +02:00
|
|
|
vcpkg_find_acquire_program(PKGCONFIG)
|
2021-12-30 03:20:49 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
2022-07-25 21:10:23 +02:00
|
|
|
"-DVCPKG_HOST_TRIPLET=${HOST_TRIPLET}"
|
2021-04-15 22:53:35 +02:00
|
|
|
${FEATURE_OPTIONS}
|
2023-04-19 16:43:20 -04:00
|
|
|
${ENABLED_OPTIONS}
|
|
|
|
${DISABLED_OPTIONS}
|
|
|
|
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
|
2021-12-30 03:20:49 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
2023-04-19 16:43:20 -04:00
|
|
|
${OPTIONS_TO_DISABLE}
|
2023-02-13 23:48:09 +08:00
|
|
|
VCPKG_BUILD_MAKE_TABLES
|
2023-04-19 16:43:20 -04:00
|
|
|
enable-coverage
|
2023-02-13 23:48:09 +08:00
|
|
|
enable-framework
|
2023-04-19 16:43:20 -04:00
|
|
|
enable-ubsan
|
2018-04-19 23:30:39 +01:00
|
|
|
)
|
|
|
|
|
2021-12-30 03:20:49 +08:00
|
|
|
vcpkg_cmake_install()
|
2023-02-13 23:48:09 +08:00
|
|
|
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/fluidsynth)
|
|
|
|
|
2021-12-29 20:59:55 +01:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2018-04-19 23:30:39 +01:00
|
|
|
|
2022-07-25 21:10:23 +02:00
|
|
|
set(tools fluidsynth)
|
|
|
|
if("buildtools" IN_LIST FEATURES)
|
|
|
|
list(APPEND tools make_tables)
|
|
|
|
endif()
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES ${tools} AUTO_CLEAN)
|
2018-04-19 23:30:39 +01:00
|
|
|
|
2023-02-14 12:40:36 -05:00
|
|
|
vcpkg_copy_pdbs()
|
2018-04-19 23:30:39 +01:00
|
|
|
|
2023-02-14 12:40:36 -05:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/share/man")
|
2018-04-19 23:30:39 +01:00
|
|
|
|
2023-02-13 23:48:09 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
2023-02-14 12:40:36 -05:00
|
|
|
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|