mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-24 13:47:55 +08:00
f685b21cb5
* [fluidsynth] Update to 2.3.3. * [fluidsynth] Update baseline.
98 lines
3.4 KiB
CMake
98 lines
3.4 KiB
CMake
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()
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO FluidSynth/fluidsynth
|
|
REF "v${VERSION}"
|
|
SHA512 "702b80ff9c8e2ba9fadd46a0377a295be78900c831ec4b6b75c2f5fee7e453b2e1f5511b076ccc044be7e6eb87086230c50c317dad3597a16d610e16032410fc"
|
|
HEAD_REF master
|
|
PATCHES
|
|
gentables.patch
|
|
)
|
|
|
|
vcpkg_check_features(
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
buildtools VCPKG_BUILD_MAKE_TABLES
|
|
sndfile enable-libsndfile
|
|
pulseaudio enable-pulseaudio
|
|
)
|
|
|
|
# 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)
|
|
set(IGNORED_OPTIONS enable-coverage enable-dbus enable-floats enable-fpe-check enable-framework enable-jack enable-lash
|
|
enable-libinstpatch enable-midishare enable-oboe enable-openmp enable-oss enable-pipewire enable-portaudio
|
|
enable-profiling enable-readline enable-sdl2 enable-systemd enable-trap-on-fpe enable-ubsan)
|
|
|
|
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()
|
|
|
|
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()
|
|
|
|
vcpkg_find_acquire_program(PKGCONFIG)
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
"-DVCPKG_HOST_TRIPLET=${HOST_TRIPLET}"
|
|
${FEATURE_OPTIONS}
|
|
${ENABLED_OPTIONS}
|
|
${DISABLED_OPTIONS}
|
|
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
|
|
MAYBE_UNUSED_VARIABLES
|
|
${OPTIONS_TO_DISABLE}
|
|
VCPKG_BUILD_MAKE_TABLES
|
|
enable-coverage
|
|
enable-framework
|
|
enable-ubsan
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/fluidsynth)
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
set(tools fluidsynth)
|
|
if("buildtools" IN_LIST FEATURES)
|
|
list(APPEND tools make_tables)
|
|
endif()
|
|
vcpkg_copy_tools(TOOL_NAMES ${tools} AUTO_CLEAN)
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
file(REMOVE_RECURSE
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
"${CURRENT_PACKAGES_DIR}/share/man")
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|