2021-06-29 09:04:09 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO PortAudio/portaudio
|
|
|
|
REF 147dd722548358763a8b649b3e4b41dfffbcfbb6
|
|
|
|
SHA512 0f56e5f5b004f51915f29771b8fc1fe886f1fef5d65ab5ea1db43f43c49917476b9eec14b36aa54d3e9fb4d8bdf61e68c79624d00b7e548d4c493395a758233a
|
|
|
|
PATCHES
|
|
|
|
fix-library-can-not-be-found.patch
|
2023-08-03 00:35:41 +08:00
|
|
|
framework_link.patch
|
2021-06-29 09:04:09 +08:00
|
|
|
)
|
|
|
|
|
2023-03-02 02:39:14 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PA_BUILD_SHARED)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PA_BUILD_STATIC)
|
2021-06-29 09:04:09 +08:00
|
|
|
|
|
|
|
# NOTE: the ASIO backend will be built automatically if the ASIO-SDK is provided
|
|
|
|
# in a sibling folder of the portaudio source in vcpkg/buildtrees/portaudio/src
|
2023-03-02 02:39:14 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2021-06-29 09:04:09 +08:00
|
|
|
OPTIONS
|
|
|
|
-DPA_USE_DS=ON
|
|
|
|
-DPA_USE_WASAPI=ON
|
|
|
|
-DPA_USE_WDMKS=ON
|
|
|
|
-DPA_USE_WMME=ON
|
|
|
|
-DPA_LIBNAME_ADD_SUFFIX=OFF
|
|
|
|
-DPA_BUILD_SHARED=${PA_BUILD_SHARED}
|
|
|
|
-DPA_BUILD_STATIC=${PA_BUILD_STATIC}
|
|
|
|
-DPA_DLL_LINK_WITH_STATIC_RUNTIME=OFF
|
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DPA_ENABLE_DEBUG_OUTPUT:BOOL=ON
|
|
|
|
)
|
|
|
|
|
2023-03-02 02:39:14 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
|
2021-06-29 09:04:09 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2023-03-02 02:39:14 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2021-06-29 09:04:09 +08:00
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
2023-03-02 02:39:14 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
2021-06-29 09:04:09 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# Handle copyright
|
2023-03-02 02:39:14 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
2021-10-28 06:19:28 +08:00
|
|
|
|
|
|
|
vcpkg_fixup_pkgconfig()
|