2024-01-26 02:50:32 +08:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
OSX_INTEL_ALIGNMENT_FIX
|
|
|
|
URLS https://github.com/zyantific/zydis/commit/a605f54580c26d2164530fab323057834569d169.patch?full_index=1
|
|
|
|
SHA512 15fad10e4880ab2ee494babc0451b96604a6cc00c09c6740c6b97b83718e01d8e117614bf8f9ec8a6777e9baa1336c7f540709b21dcdc9b53f912bd117f1d3c0
|
|
|
|
FILENAME zydis-intel-alignment-fix-a605f54580c26d2164530fab323057834569d169.patch
|
|
|
|
)
|
|
|
|
|
2019-06-13 14:10:50 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO zyantific/zydis
|
2023-06-14 11:49:59 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 334284bccfb6ce61cc530fd479d6278db3e4df1fb52b311acd7d21558843c9bf14e74a199cd937041d434260b65c506c07ae1a37243d2240eb9443ae5e56e000
|
2020-03-03 13:30:06 +08:00
|
|
|
HEAD_REF master
|
2022-10-17 02:02:49 +08:00
|
|
|
PATCHES
|
|
|
|
zycore.patch
|
2024-01-26 02:50:32 +08:00
|
|
|
"${OSX_INTEL_ALIGNMENT_FIX}"
|
2019-06-13 14:10:50 +08:00
|
|
|
)
|
|
|
|
|
2021-11-19 12:36:13 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ZYDIS_BUILD_SHARED_LIB)
|
2020-03-03 13:30:06 +08:00
|
|
|
|
2021-11-19 12:36:13 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-03-03 13:30:06 +08:00
|
|
|
OPTIONS
|
2023-06-14 11:49:59 +08:00
|
|
|
-DZYDIS_BUILD_SHARED_LIB=${ZYDIS_BUILD_SHARED_LIB}
|
2022-10-17 02:02:49 +08:00
|
|
|
-DZYDIS_BUILD_EXAMPLES=OFF
|
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DZYDIS_BUILD_TOOLS=OFF
|
2020-05-12 06:35:40 +08:00
|
|
|
)
|
|
|
|
|
2021-11-19 12:36:13 +08:00
|
|
|
vcpkg_cmake_install()
|
2020-05-12 06:35:40 +08:00
|
|
|
|
2022-11-08 07:36:21 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/zydis)
|
2021-11-19 12:36:13 +08:00
|
|
|
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES ZydisDisasm ZydisInfo AUTO_CLEAN)
|
2019-06-13 14:10:50 +08:00
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
2021-11-19 12:36:13 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
2023-07-11 08:14:57 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/Zydis/Defines.h" "defined(ZYDIS_STATIC_BUILD)" "1")
|
2019-06-13 14:10:50 +08:00
|
|
|
endif()
|
|
|
|
|
2021-11-19 12:36:13 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2019-06-13 14:10:50 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2023-06-14 11:49:59 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|