2019-09-24 03:27:07 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO andrewrk/libsoundio
|
|
|
|
REF 2.0.0
|
|
|
|
SHA512 347a9be1789a41e778ea8d0efa1d00e03e725a4ab65e3aaf6c71e49138643f08a50a81bd60087d86a3b4d63beaeec617e47ba6b81f829ece8a3ac17418eb5309
|
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
|
|
|
fix_cmakelists.patch
|
|
|
|
)
|
|
|
|
|
2020-02-04 06:22:52 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_DYNAMIC_LIBS)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS)
|
2019-09-24 03:27:07 +08:00
|
|
|
|
2021-04-03 04:25:21 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
alsa ENABLE_ALSA
|
|
|
|
jack ENABLE_JACK
|
|
|
|
pulseaudio ENABLE_PULSEAUDIO
|
|
|
|
)
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-09-24 03:27:07 +08:00
|
|
|
OPTIONS
|
2020-02-04 06:22:52 +08:00
|
|
|
-DBUILD_DYNAMIC_LIBS=${BUILD_DYNAMIC_LIBS}
|
|
|
|
-DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
|
2019-09-24 03:27:07 +08:00
|
|
|
-DBUILD_EXAMPLE_PROGRAMS=OFF
|
|
|
|
-DBUILD_TESTS=OFF
|
2021-04-03 04:25:21 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2020-02-04 06:22:52 +08:00
|
|
|
-DENABLE_COREAUDIO=${VCPKG_TARGET_IS_OSX}
|
|
|
|
-DENABLE_WASAPI=${VCPKG_TARGET_IS_WINDOWS}
|
2019-09-24 03:27:07 +08:00
|
|
|
)
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup()
|
2019-09-24 03:27:07 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
2023-03-08 06:14:52 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2019-09-24 03:27:07 +08:00
|
|
|
endif()
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|