[zydis] Move tools to a feature (#46078)

Co-authored-by: Lily Wang <94091114+LilyWangLL@users.noreply.github.com>
Co-authored-by: Kai Pastor <dg0yt@darc.de>
This commit is contained in:
Michał Petryka
2025-06-24 23:41:09 +02:00
committed by GitHub
parent c13d12aae1
commit 033acf7536
4 changed files with 22 additions and 5 deletions

View File

@@ -1,4 +1,3 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO zyantific/zydis
@@ -7,11 +6,15 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
zycore.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ZYDIS_BUILD_SHARED_LIB)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
tools ZYDIS_BUILD_TOOLS
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
@@ -20,6 +23,7 @@ vcpkg_cmake_configure(
-DZYDIS_BUILD_DOXYGEN=OFF
-DZYDIS_BUILD_EXAMPLES=OFF
-DZYDIS_BUILD_TESTS=OFF
${FEATURE_OPTIONS}
OPTIONS_DEBUG
-DZYDIS_BUILD_TOOLS=OFF
)
@@ -28,7 +32,9 @@ vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/zydis)
vcpkg_copy_tools(TOOL_NAMES ZydisDisasm ZydisInfo AUTO_CLEAN)
if ("tools" IN_LIST FEATURES)
vcpkg_copy_tools(TOOL_NAMES ZydisDisasm ZydisInfo AUTO_CLEAN)
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/Zydis/Defines.h" "defined(ZYDIS_STATIC_BUILD)" "1")

View File

@@ -1,6 +1,7 @@
{
"name": "zydis",
"version-semver": "4.1.1",
"port-version": 1,
"description": "Fast and lightweight x86/x86-64 disassembler library.",
"homepage": "https://zydis.re",
"license": "MIT",
@@ -14,5 +15,10 @@
"host": true
},
"zycore"
]
],
"features": {
"tools": {
"description": "Builds zydis executables"
}
}
}

View File

@@ -10550,7 +10550,7 @@
},
"zydis": {
"baseline": "4.1.1",
"port-version": 0
"port-version": 1
},
"zyre": {
"baseline": "2024-04-10",

View File

@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6851f43c4942dfc1a44c43336e8f2febf1775138",
"version-semver": "4.1.1",
"port-version": 1
},
{
"git-tree": "45ddfb739de0637d4c046d26dd91b88e6caef94e",
"version-semver": "4.1.1",