[zstd] fix pkg-config files (#12407)

* [zstd] add pkgconfig

* [zstd] correct debug link

* Update ports/zstd/CONTROL

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
This commit is contained in:
Alexander Neumann 2020-07-14 23:40:43 +02:00 committed by GitHub
parent d2620cf02b
commit c9da48de31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,5 @@
Source: zstd
Version: 1.4.4-1
Version: 1.4.4
Port-Version: 2
Description: Zstandard - Fast real-time compression algorithm
Homepage: https://facebook.github.io/zstd/

View File

@ -1,4 +1,3 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO facebook/zstd
@ -40,6 +39,10 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/zstd)
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libzstd.pc")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libzstd.pc" "-lzstd" "-lzstdd")
endif()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)