mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 06:17:50 +08:00
73cfc65919
* [libilbc] New port libilbc is an Internet Low Bit Rate Codec (iLBC) / RFC 3951 codec. Closes #14836. * Update ports/libilbc/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update ports/libilbc/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * [libilbc] Use vcpkg_copy_tools, update arm-uwp. * [libilbc] More packaging cleanups. Add vcpkg_fixup_pkgconfig after vcpkg_install_cmake. Install docs into $PREFIX/share/libilbc. Remove ilbc_test after a dynamic build and the bin and debug/bin dirs after a static build. Fixup include/ilbc_export.h for static builds. Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
34 lines
1.0 KiB
CMake
34 lines
1.0 KiB
CMake
set(ILBC_VERSION 3.0.3)
|
|
vcpkg_download_distfile(ARCHIVE
|
|
URLS "https://github.com/TimothyGu/libilbc/releases/download/v${ILBC_VERSION}/libilbc-${ILBC_VERSION}.zip"
|
|
FILENAME "libilbc-${ILBC_VERSION}.zip"
|
|
SHA512 a5755db093529f6a3fd8fd47da63b57cffff1d3babef443d92f7c5a250ce8d1585adfba525c4037b142d9f00f1675a5054c172bf936be280dfcc22ed553c94c6
|
|
)
|
|
|
|
vcpkg_extract_source_archive_ex(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
ARCHIVE ${ARCHIVE}
|
|
REF ${ILBC_VERSION}
|
|
PATCHES do-not-build-ilbc_test.patch
|
|
)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-DCMAKE_INSTALL_DOCDIR=share/${PORT}
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/ilbc_export.h "#ifdef ILBC_STATIC_DEFINE" "#if 1")
|
|
endif()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|