mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[liblzma] Update wrapper, add feature tools (#24708)
* Fix liblzma wrapper for older CMake * Add feature for tools * Update versions * Test find_package(... REQUIRED)
This commit is contained in:
parent
61058871a9
commit
8d59cb32d2
18
ports/liblzma/build-tools.patch
Normal file
18
ports/liblzma/build-tools.patch
Normal file
@ -0,0 +1,18 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index cddbccb..63c8f3d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -492,6 +492,7 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblzmaConfig.cmake"
|
||||
COMPONENT liblzma_Development)
|
||||
|
||||
|
||||
+if(BUILD_TOOLS)
|
||||
#############################################################################
|
||||
# getopt_long
|
||||
#############################################################################
|
||||
@@ -663,3 +664,4 @@ if(NOT MSVC AND HAVE_GETOPT_LONG)
|
||||
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
|
||||
COMPONENT xz)
|
||||
endif()
|
||||
+endif()
|
||||
\ No newline at end of file
|
@ -9,10 +9,17 @@ vcpkg_from_github(
|
||||
fix_config_include.patch
|
||||
win_output_name.patch # Fix output name on Windows. Autotool build does not generate lib prefixed libraries on windows.
|
||||
add_support_ios.patch # add install bundle info for support ios
|
||||
build-tools.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
tools BUILD_TOOLS
|
||||
)
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
@ -13,7 +13,7 @@ if(NOT "CONFIG" IN_LIST ARGS AND NOT "NO_MODULE" IN_LIST ARGS AND NOT CMAKE_DISA
|
||||
if(CMAKE_VERSION VERSION_LESS 3.16)
|
||||
# Older versions of FindLibLZMA.cmake need a single lib in LIBLZMA_LIBRARY.
|
||||
set(z_vcpkg_liblzma_fixup_needed 1)
|
||||
set(LIBLZMA_LIBRARY "${LIBLZMA_LIBRARY_RELEASE}")
|
||||
set(LIBLZMA_LIBRARY "${LIBLZMA_LIBRARY_RELEASE}" CACHE INTERNAL "")
|
||||
elseif(NOT TARGET LibLZMA::LibLZMA)
|
||||
set(z_vcpkg_liblzma_fixup_needed 1)
|
||||
endif()
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "liblzma",
|
||||
"version-semver": "5.2.5",
|
||||
"port-version": 5,
|
||||
"port-version": 6,
|
||||
"description": "Compression library with an API similar to that of zlib.",
|
||||
"homepage": "https://github.com/xz-mirror/xz",
|
||||
"license": null,
|
||||
@ -14,5 +14,11 @@
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"features": {
|
||||
"tools": {
|
||||
"description": "Build tools",
|
||||
"supports": "!windows, mingw"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,6 +53,8 @@ foreach(package ${FIND_PACKAGES})
|
||||
message(SEND_ERROR "find_package(${package}) check: failed")
|
||||
continue()
|
||||
endif()
|
||||
# REQUIRED changes the behaviour find_package_handle_standard_args.
|
||||
find_package("${package}" REQUIRED)
|
||||
message(STATUS "find_package(${package}) check: success")
|
||||
|
||||
set(libraries_var "")
|
||||
|
@ -3738,7 +3738,7 @@
|
||||
},
|
||||
"liblzma": {
|
||||
"baseline": "5.2.5",
|
||||
"port-version": 5
|
||||
"port-version": 6
|
||||
},
|
||||
"libmad": {
|
||||
"baseline": "0.15.1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "96b6aac6211ad3fd3da29508a519c3cd5f09716d",
|
||||
"version-semver": "5.2.5",
|
||||
"port-version": 6
|
||||
},
|
||||
{
|
||||
"git-tree": "18b7cbd0972b536a6bd4c0ef0f41dce9c3f047ac",
|
||||
"version-semver": "5.2.5",
|
||||
|
Loading…
x
Reference in New Issue
Block a user