2018-04-20 06:30:39 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO FluidSynth/fluidsynth
|
2023-02-13 23:48:09 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 1633294bf6c714361c381151b62d9dd2c8f388490153e7964bfa14fd647a681db9ebfe1de0a06279972d6c5b30377f67361feb4db186b1faa235600f0ae02b22
|
2018-04-20 06:30:39 +08:00
|
|
|
HEAD_REF master
|
2019-08-28 05:48:58 +08:00
|
|
|
PATCHES
|
2022-07-26 03:10:23 +08:00
|
|
|
gentables.patch
|
2023-02-15 01:40:36 +08:00
|
|
|
add-usage-requirements.patch
|
2018-04-20 06:30:39 +08:00
|
|
|
)
|
|
|
|
|
2022-05-12 07:38:46 +08:00
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
2022-07-26 03:10:23 +08:00
|
|
|
buildtools VCPKG_BUILD_MAKE_TABLES
|
2022-05-12 07:38:46 +08:00
|
|
|
sndfile enable-libsndfile
|
|
|
|
)
|
|
|
|
|
2023-03-20 15:49:29 +08:00
|
|
|
set(feature_list dbus jack libinstpatch midishare opensles oboe openmp oss sdl2 pulseaudio readline lash systemd dart)
|
2021-04-16 04:53:35 +08:00
|
|
|
foreach(_feature IN LISTS feature_list)
|
|
|
|
list(APPEND FEATURE_OPTIONS -Denable-${_feature}:BOOL=OFF)
|
|
|
|
endforeach()
|
|
|
|
|
2022-05-17 05:07:38 +08:00
|
|
|
# enable platform-specific features, and force the build to fail if the
|
|
|
|
# required libraries are not found
|
|
|
|
list(APPEND FEATURE_OPTIONS -Denable-dsound=${VCPKG_TARGET_IS_WINDOWS})
|
|
|
|
list(APPEND FEATURE_OPTIONS -Denable-wasapi=${VCPKG_TARGET_IS_WINDOWS})
|
|
|
|
list(APPEND FEATURE_OPTIONS -Denable-waveout=${VCPKG_TARGET_IS_WINDOWS})
|
|
|
|
list(APPEND FEATURE_OPTIONS -Denable-winmidi=${VCPKG_TARGET_IS_WINDOWS})
|
|
|
|
list(APPEND FEATURE_OPTIONS -DHAVE_MMSYSTEM_H=${VCPKG_TARGET_IS_WINDOWS})
|
|
|
|
list(APPEND FEATURE_OPTIONS -DHAVE_DSOUND_H=${VCPKG_TARGET_IS_WINDOWS})
|
|
|
|
list(APPEND FEATURE_OPTIONS -DHAVE_WASAPI_HEADERS=${VCPKG_TARGET_IS_WINDOWS})
|
|
|
|
list(APPEND FEATURE_OPTIONS -DHAVE_OBJBASE_H=${VCPKG_TARGET_IS_WINDOWS})
|
|
|
|
list(APPEND FEATURE_OPTIONS -Denable-coreaudio=${VCPKG_TARGET_IS_OSX})
|
|
|
|
list(APPEND FEATURE_OPTIONS -Denable-coremidi=${VCPKG_TARGET_IS_OSX})
|
|
|
|
list(APPEND FEATURE_OPTIONS -DCOREAUDIO_FOUND=${VCPKG_TARGET_IS_OSX})
|
|
|
|
list(APPEND FEATURE_OPTIONS -DCOREMIDI_FOUND=${VCPKG_TARGET_IS_OSX})
|
|
|
|
list(APPEND FEATURE_OPTIONS -Denable-alsa=${VCPKG_TARGET_IS_LINUX})
|
|
|
|
list(APPEND FEATURE_OPTIONS -DALSA_FOUND=${VCPKG_TARGET_IS_LINUX})
|
|
|
|
|
2021-04-16 04:53:35 +08:00
|
|
|
vcpkg_find_acquire_program(PKGCONFIG)
|
2021-12-30 03:20:49 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
2022-07-26 03:10:23 +08:00
|
|
|
"-DVCPKG_HOST_TRIPLET=${HOST_TRIPLET}"
|
2021-04-16 04:53:35 +08:00
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}
|
2021-12-30 03:20:49 +08:00
|
|
|
-Denable-framework=OFF # Needs system permission to install framework
|
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
enable-coreaudio
|
|
|
|
enable-coremidi
|
|
|
|
enable-dart
|
2023-02-13 23:48:09 +08:00
|
|
|
ALSA_FOUND
|
|
|
|
COREAUDIO_FOUND
|
|
|
|
COREMIDI_FOUND
|
|
|
|
VCPKG_BUILD_MAKE_TABLES
|
|
|
|
enable-framework
|
2018-04-20 06:30:39 +08: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-30 03:59:55 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2018-04-20 06:30:39 +08:00
|
|
|
|
2022-07-26 03:10:23 +08: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-20 06:30:39 +08:00
|
|
|
|
2023-02-15 01:40:36 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2018-04-20 06:30:39 +08:00
|
|
|
|
2023-02-15 01:40:36 +08:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/share/man")
|
2018-04-20 06:30:39 +08:00
|
|
|
|
2023-02-13 23:48:09 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
2023-02-15 01:40:36 +08:00
|
|
|
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|