2024-01-26 02:50:32 +08:00
|
|
|
|
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}"
|
2024-06-04 14:04:10 +08:00
|
|
|
SHA512 e07add4d43768ded02a238911fde6e74d2391abf8df282f774fca1a8c3fca3e97b03e90e0f3c7c0f3c75485fb29c0be4071d5e5b2e23dd5b8b1a864e3b713fbc
|
2020-03-03 13:30:06 +08:00
|
|
|
HEAD_REF master
|
2022-10-17 02:02:49 +08:00
|
|
|
PATCHES
|
|
|
|
zycore.patch
|
2024-06-04 14:04:10 +08:00
|
|
|
|
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
|
2024-06-04 14:04:10 +08:00
|
|
|
-DZYAN_SYSTEM_ZYCORE=ON
|
2023-06-14 11:49:59 +08:00
|
|
|
-DZYDIS_BUILD_SHARED_LIB=${ZYDIS_BUILD_SHARED_LIB}
|
2024-06-04 14:04:10 +08:00
|
|
|
-DZYDIS_BUILD_DOXYGEN=OFF
|
2022-10-17 02:02:49 +08:00
|
|
|
-DZYDIS_BUILD_EXAMPLES=OFF
|
2024-06-04 14:04:10 +08:00
|
|
|
-DZYDIS_BUILD_TESTS=OFF
|
2022-10-17 02:02:49 +08:00
|
|
|
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)
|
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")
|