[vcpkg baseline][zydis, zycore] Fix file conflicts (#27249)

* [zycore] disable find Doxygen

* [zydis] use Zycore from port zycore

* version
This commit is contained in:
Thomas1664 2022-10-16 20:02:49 +02:00 committed by GitHub
parent 469ba389f9
commit 0321a8422e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 68 additions and 22 deletions

View File

@ -1,23 +1,24 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO zyantific/zycore-c
REF 4a8b5e2ab4d6ee73aa92d04bc318fed607394e67
REF 4a8b5e2ab4d6ee73aa92d04bc318fed607394e67
SHA512 c707f5e07411d9f00fa59e3c382345009f225ed9406063b9863604f15a9c45c9a32bc9c3100f08d9c5800cc2254f71bfae817979b85bc604739ca1ee854c94e5
HEAD_REF master
PATCHES
fix-install.patch
)
string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} dynamic ZYCORE_BUILD_SHARED)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" dynamic ZYCORE_BUILD_SHARED)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS -DZYCORE_BUILD_SHARED_LIB=${ZYCORE_BUILD_SHARED}
OPTIONS
-DZYCORE_BUILD_SHARED_LIB=${ZYCORE_BUILD_SHARED}
-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(
CONFIG_PATH lib/cmake/zycore
)

View File

@ -1,6 +1,7 @@
{
"name": "zycore",
"version": "1.3.0",
"port-version": 1,
"description": "Provides platform independent types, macros and a fallback for environments without LibC.",
"homepage": "https://github.com/zyantific/zycore-c",
"license": "MIT",

View File

@ -4,14 +4,8 @@ vcpkg_from_github(
REF 4022f22f9280650082a9480519c86a6e2afde2f3 #v3.2.1
SHA512 da3ff582d3c4cbb5e4053cd468f181550f02d0a1713a39944266e6d1b0e3249e24461f87171ef99e249e6d5b2fc39fcca402518c569399ae5d4a64e0d3dc4b3b
HEAD_REF master
)
vcpkg_from_github(
OUT_SOURCE_PATH ZYCORE_SOURCE_PATH
REPO zyantific/zycore-c
REF 8983325bf0007f0d6d2ea28a49040a77f47bd611 #2021-11-17
SHA512 e41dc70413d2a5bb5ac549ab602c54bfaba3ea61dcd0817bfdf20e4e12d6b3e1cc587fa58ba653bd7513aa735311d3b7b4bc408d8092a98ab6cf1b44012e4e22
HEAD_REF master
PATCHES
zycore.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ZYDIS_BUILD_SHARED_LIB)
@ -20,13 +14,9 @@ vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
"-DZYDIS_BUILD_SHARED_LIB=${ZYDIS_BUILD_SHARED_LIB}"
"-DZYDIS_ZYCORE_PATH=${ZYCORE_SOURCE_PATH}"
)
vcpkg_cmake_install()
vcpkg_cmake_configure(
SOURCE_PATH "${ZYCORE_SOURCE_PATH}"
-DZYDIS_BUILD_EXAMPLES=OFF
OPTIONS_DEBUG
-DZYDIS_BUILD_TOOLS=OFF
)
vcpkg_cmake_install()

View File

@ -1,8 +1,10 @@
{
"name": "zydis",
"version-semver": "3.2.1",
"port-version": 1,
"description": "Fast and lightweight x86/x86-64 disassembler library.",
"homepage": "https://zydis.re",
"license": "MIT",
"dependencies": [
{
"name": "vcpkg-cmake",
@ -11,6 +13,7 @@
{
"name": "vcpkg-cmake-config",
"host": true
}
},
"zycore"
]
}

41
ports/zydis/zycore.patch Normal file
View File

@ -0,0 +1,41 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9898f424..8cba0e96 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -54,8 +54,7 @@ set(ZYDIS_ZYCORE_PATH
# =============================================================================================== #
# Try to initialize the Zycore submodule using Git
-if (NOT EXISTS "${ZYDIS_ZYCORE_PATH}/CMakeLists.txt" AND
- "${ZYDIS_ZYCORE_PATH}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}/dependencies/zycore")
+if (0)
find_package(Git QUIET)
if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
execute_process(
@@ -65,7 +64,7 @@ if (NOT EXISTS "${ZYDIS_ZYCORE_PATH}/CMakeLists.txt" AND
endif()
endif ()
-if (NOT EXISTS "${ZYDIS_ZYCORE_PATH}/CMakeLists.txt")
+if (0)
message(
FATAL_ERROR
"Can't find zycore submodule. Please make sure to clone the repo recursively.\n"
@@ -77,7 +76,7 @@ if (NOT EXISTS "${ZYDIS_ZYCORE_PATH}/CMakeLists.txt")
)
endif ()
-add_subdirectory(${ZYDIS_ZYCORE_PATH} "zycore" EXCLUDE_FROM_ALL)
+find_package(zycore CONFIG REQUIRED)
# =============================================================================================== #
# Library configuration #
@@ -89,7 +88,7 @@ else ()
add_library("Zydis" STATIC)
endif ()
-target_link_libraries("Zydis" PUBLIC "Zycore")
+target_link_libraries(Zydis PUBLIC Zycore::Zycore)
target_include_directories("Zydis"
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>

View File

@ -8178,11 +8178,11 @@
},
"zycore": {
"baseline": "1.3.0",
"port-version": 0
"port-version": 1
},
"zydis": {
"baseline": "3.2.1",
"port-version": 0
"port-version": 1
},
"zyre": {
"baseline": "2019-07-07",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b1f54fb1aabdc1dc6bcb5f100d7790bd6583bbc3",
"version": "1.3.0",
"port-version": 1
},
{
"git-tree": "fde401adae59d8a172f55fda3899f258668e1c1b",
"version": "1.3.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "a021ff1e31fecf096d68bb9cc9aa30121f3dd0bc",
"version-semver": "3.2.1",
"port-version": 1
},
{
"git-tree": "ea22eba12ef8bd109c21b3684abe6513070e122f",
"version-semver": "3.2.1",