[libdeflate] Fix usage (#35460)

This commit is contained in:
Kai Pastor 2023-12-05 02:30:52 +01:00 committed by GitHub
parent 3ad8a69502
commit 8b838b5616
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 2 deletions

View File

@ -32,6 +32,17 @@ vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/libdeflate")
vcpkg_fixup_pkgconfig()
if(VCPKG_TARGET_IS_WINDOWS)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/libdeflate.h" "defined(LIBDEFLATE_DLL)" "1")
elseif(NOT VCPKG_TARGET_IS_MINGW)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libdeflate.pc" " -ldeflate" " -ldeflatestatic")
if(NOT VCPKG_BUILD_TYPE)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libdeflate.pc" " -ldeflate" " -ldeflatestatic")
endif()
endif()
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

View File

@ -1,4 +1,4 @@
The package zstd provides CMake targets:
libdeflate provides CMake targets:
find_package(libdeflate CONFIG REQUIRED)
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:libdeflate::libdeflate_shared>,libdeflate::libdeflate_shared,libdeflate::libdeflate_static>)

View File

@ -1,6 +1,7 @@
{
"name": "libdeflate",
"version": "1.19",
"port-version": 1,
"description": "libdeflate is a library for fast, whole-buffer DEFLATE-based compression and decompression.",
"homepage": "https://github.com/ebiggers/libdeflate",
"license": "MIT",

View File

@ -4198,7 +4198,7 @@
},
"libdeflate": {
"baseline": "1.19",
"port-version": 0
"port-version": 1
},
"libdisasm": {
"baseline": "0.23",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "76f16e38faecc95d0dc0c1a4a2ac32a4983f4775",
"version": "1.19",
"port-version": 1
},
{
"git-tree": "60231c270c3eca938a64b43dfb0b66846787a464",
"version": "1.19",