mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-16 03:19:05 +08:00
43 lines
1.4 KiB
CMake
43 lines
1.4 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO FluidSynth/fluidsynth
|
|
REF 90a6c52e1c347d1c4283b0de9f860ed2fbc413bc #v2.2.1
|
|
SHA512 311a078e95204baf9b348fb8c83370003982fad59553de945437fec7647c9237dd4382f9f8f70080ed472745c66fe528764cd898581d628ab4422427c3d58b3a
|
|
HEAD_REF master
|
|
PATCHES
|
|
force-x86-gentables.patch
|
|
)
|
|
|
|
set(feature_list dbus jack libinstpatch libsndfile midishare opensles oboe oss sdl2 pulseaudio readline lash alsa systemd coreaudio coremidi dart)
|
|
set(FEATURE_OPTIONS)
|
|
foreach(_feature IN LISTS feature_list)
|
|
list(APPEND FEATURE_OPTIONS -Denable-${_feature}:BOOL=OFF)
|
|
endforeach()
|
|
|
|
vcpkg_find_acquire_program(PKGCONFIG)
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
OPTIONS
|
|
${FEATURE_OPTIONS}
|
|
-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}
|
|
-DLIB_INSTALL_DIR=lib
|
|
OPTIONS_DEBUG
|
|
-Denable-debug:BOOL=ON
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
# Copy fluidsynth.exe to tools dir
|
|
vcpkg_copy_tools(TOOL_NAMES fluidsynth AUTO_CLEAN)
|
|
|
|
# Remove unnecessary files
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
endif()
|
|
|
|
# Handle copyright
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|