2018-04-20 06:30:39 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO FluidSynth/fluidsynth
|
2021-12-30 03:20:49 +08:00
|
|
|
REF 6c807bdd37748411801e93c48fcd5789d5a6a278 #v2.2.4
|
|
|
|
SHA512 5fab3b4d58fa47825cf6afc816828fb57879523b8d7659fb20deacdf5439e74fd4b0f2b3f03a8db89cc4106b3b36f2ec450a858e02af30245b6413db70060a11
|
2018-04-20 06:30:39 +08:00
|
|
|
HEAD_REF master
|
2019-08-28 05:48:58 +08:00
|
|
|
PATCHES
|
2021-12-30 03:20:49 +08:00
|
|
|
fix-dependencies.patch
|
|
|
|
separate-gentables.patch
|
2018-04-20 06:30:39 +08:00
|
|
|
)
|
|
|
|
|
2021-12-30 03:20:49 +08:00
|
|
|
if ("buildtools" IN_LIST FEATURES)
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}/src/gentables"
|
|
|
|
LOGFILE_BASE configure-tools
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_build(
|
|
|
|
LOGFILE_BASE install-tools
|
|
|
|
TARGET install
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES make_tables AUTO_CLEAN)
|
|
|
|
|
|
|
|
vcpkg_add_to_path(APPEND "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
|
|
|
endif()
|
|
|
|
|
2021-04-16 04:53:35 +08:00
|
|
|
set(feature_list dbus jack libinstpatch libsndfile midishare opensles oboe oss sdl2 pulseaudio readline lash alsa systemd coreaudio coremidi dart)
|
2021-12-30 03:20:49 +08:00
|
|
|
vcpkg_list(SET FEATURE_OPTIONS)
|
2021-04-16 04:53:35 +08:00
|
|
|
foreach(_feature IN LISTS feature_list)
|
|
|
|
list(APPEND FEATURE_OPTIONS -Denable-${_feature}:BOOL=OFF)
|
|
|
|
endforeach()
|
|
|
|
|
2021-12-30 03:20:49 +08:00
|
|
|
vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}")
|
|
|
|
|
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
|
2021-04-16 04:53:35 +08:00
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}
|
2021-10-27 13:14:34 +08:00
|
|
|
-DLIB_INSTALL_DIR=lib
|
2021-12-30 03:20:49 +08:00
|
|
|
-Denable-pkgconfig=ON
|
|
|
|
-Denable-framework=OFF # Needs system permission to install framework
|
2021-04-16 04:53:35 +08:00
|
|
|
OPTIONS_DEBUG
|
|
|
|
-Denable-debug:BOOL=ON
|
2021-12-30 03:20:49 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
enable-coreaudio
|
|
|
|
enable-coremidi
|
|
|
|
enable-dart
|
2018-04-20 06:30:39 +08:00
|
|
|
)
|
|
|
|
|
2021-12-30 03:20:49 +08:00
|
|
|
vcpkg_cmake_install()
|
2021-12-30 03:59:55 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2018-04-20 06:30:39 +08:00
|
|
|
|
|
|
|
# Copy fluidsynth.exe to tools dir
|
2020-08-20 10:45:55 +08:00
|
|
|
vcpkg_copy_tools(TOOL_NAMES fluidsynth AUTO_CLEAN)
|
2018-04-20 06:30:39 +08:00
|
|
|
|
|
|
|
# Remove unnecessary files
|
2021-12-30 03:20:49 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2018-04-20 06:30:39 +08:00
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
2021-12-30 03:20:49 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
2018-04-20 06:30:39 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# Handle copyright
|
2021-12-30 03:20:49 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|