[Asmjit ] Asmjit update - Following pull request #39090 (#39630)

Co-authored-by: Petr Kobalicek <kobalicek.petr@gmail.com>
Co-authored-by: Stephen Eckels <stevemk14ebr@gmail.com>
This commit is contained in:
Jakub Melka 2024-07-05 19:57:37 +02:00 committed by GitHub
parent efd5cdaf1e
commit f08f5fc850
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 30 additions and 81 deletions

View File

@ -1,8 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO asmjit/asmjit
REF 51b10b19b6631434d3f9ad536a6fb140944a36d2 # commited on 2023-03-25
SHA512 1fba5159d2adad64e9a2b07a1f90de6988d1da47b9802ca8b57c61a89d8a90924525f6d0d6607279994bdbadcf693b2cc96cd7e4bf7f018ad64127b640dc38fb
REF ffac9f36fb045dd2c6a81e1b5b9ccc115e5ef924 # commited on 2024-06-28
SHA512 3a594bdea7095f66356f8c21e03a4db2535811988726c25a29e66721cb703dc9dceddeb5f8a6c7daeafba3fbf6dd07e71375446d8dfb182f57c14bce28192774
HEAD_REF master
)
@ -16,7 +16,6 @@ vcpkg_cmake_configure(
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/asmjit)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

View File

@ -1,9 +1,10 @@
{
"name": "asmjit",
"version-date": "2023-03-25",
"description": "Complete x86/x64 JIT and Remote Assembler for C++",
"homepage": "https://github.com/asmjit/asmjit",
"supports": "!arm",
"version-date": "2024-06-28",
"description": "AsmJit is a lightweight library for machine code generation written in C++ language",
"homepage": "https://asmjit.com/",
"documentation": "https://asmjit.com/doc/",
"license": "Zlib",
"dependencies": [
{
"name": "vcpkg-cmake",

View File

@ -1,10 +1,11 @@
{
"name": "fbgemm",
"version": "0.4.1",
"port-version": 1,
"description": "FB (Facebook) + GEMM (General Matrix-Matrix Multiplication)",
"homepage": "https://code.fb.com/ml-applications/fbgemm/",
"license": "BSD-3-Clause",
"supports": "!(x86 | uwp)",
"supports": "!arm & !x86 & !uwp",
"dependencies": [
"asmjit",
"cpuinfo",

View File

@ -1,66 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 65f3c73..586d582 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -209,14 +209,8 @@ endif()
#DisAsm/Zydis
if (POLYHOOK_USE_EXTERNAL_ZYDIS)
- find_library(ZYDIS_LIBRARY NAMES zydis)
- find_library(ZYCORE_LIBRARY NAMES zycore)
- find_path(ZYDIS_INCLUDE_DIR NAMES zydis/zydis.h)
- find_path(ZYCORE_INCLUDE_DIR NAMES zycore/zycore.h)
- target_link_libraries(${PROJECT_NAME} PUBLIC ${ZYDIS_LIBRARY})
- target_link_libraries(${PROJECT_NAME} PUBLIC ${ZYCORE_LIBRARY})
- target_include_directories(${PROJECT_NAME} PUBLIC ${ZYDIS_INCLUDE_DIR})
- target_include_directories(${PROJECT_NAME} PUBLIC ${ZYCORE_INCLUDE_DIR})
+ find_package(zydis REQUIRED)
+ target_link_libraries(${PROJECT_NAME} PUBLIC Zydis::Zydis)
else()
target_link_libraries(${PROJECT_NAME} PUBLIC $<BUILD_INTERFACE:Zydis>)
target_include_directories(${PROJECT_NAME} PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/zydis/include>)
@@ -229,10 +223,8 @@ install(FILES ${PROJECT_SOURCE_DIR}/polyhook2/ZydisDisassembler.hpp DESTINATION
function(link_asmjit)
if (POLYHOOK_USE_EXTERNAL_ASMJIT)
- find_library(ASMJIT_LIBRARY NAMES asmjit)
- find_path(ASMJIT_INCLUDE_DIR NAMES asmjit/asmjit.h)
- target_link_libraries(${PROJECT_NAME} PRIVATE ${ASMJIT_LIBRARY})
- target_include_directories(${PROJECT_NAME} PUBLIC ${ASMJIT_INCLUDE_DIR})
+ find_package(asmjit REQUIRED)
+ target_link_libraries(${PROJECT_NAME} PRIVATE asmjit::asmjit)
else()
target_link_libraries(${PROJECT_NAME} PRIVATE $<BUILD_INTERFACE:asmjit>)
target_include_directories(${PROJECT_NAME} PUBLIC "$<BUILD_INTERFACE:${ASMJIT_SRC}>")
@@ -244,10 +236,8 @@ if(POLYHOOK_FEATURE_DETOURS)
link_asmjit()
if (POLYHOOK_USE_EXTERNAL_ASMTK)
- find_library(ASMTK_LIBRARY NAMES asmtk)
- find_path(ASMTK_INCLUDE_DIR NAMES asmtk/asmtk.h)
- target_link_libraries(${PROJECT_NAME} PUBLIC ${ASMTK_LIBRARY})
- target_include_directories(${PROJECT_NAME} PUBLIC ${ASMTK_INCLUDE_DIR})
+ find_package(asmtk REQUIRED)
+ target_link_libraries(${PROJECT_NAME} PRIVATE asmjit::asmtk)
else()
target_link_libraries(${PROJECT_NAME} PUBLIC $<BUILD_INTERFACE:asmtk>)
target_include_directories(${PROJECT_NAME} PUBLIC "$<BUILD_INTERFACE:${ASMTK_SRC}>")
diff --git a/polyhook_2-config.cmake.in b/polyhook_2-config.cmake.in
index 709f8b5..599d1f7 100644
--- a/polyhook_2-config.cmake.in
+++ b/polyhook_2-config.cmake.in
@@ -10,5 +10,14 @@ set(POLYHOOK_FEATURE_INLINENTD @POLYHOOK_FEATURE_INLINENTD@)
set(POLYHOOK_FEATURE_PE @POLYHOOK_FEATURE_PE@)
set(POLYHOOK_FEATURE_VIRTUALS @POLYHOOK_FEATURE_VIRTUALS@)
+include(CMakeFindDependencyMacro)
+find_dependency(Zydis)
+if(POLYHOOK_FEATURE_DETOURS)
+ find_dependency(asmjit)
+endif()
+if(POLYHOOK_FEATURE_INLINENTD)
+ find_dependency(asmtk)
+endif()
+
get_filename_component(POLYHOOK_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
include("${POLYHOOK_CMAKE_DIR}/PolyHook_2-targets.cmake")

View File

@ -1,10 +1,9 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO stevemk14ebr/PolyHook_2_0
REF fd2a88f09c8ae89440858fc52573656141013c7f
SHA512 09eef1b0ca75f9420fa258c4290b6b62a3115531e77c91f9d223b2c4a10e8ee95b243bf9f6598d7c55b76ca4e4a185cdf1231b40d5ef87d7d405b8b434eb6cb0
REF 8cd6cb4ef0f2a599f35bdd46ac5833843aea6523
SHA512 93e6fcbb47f4b894c325766e1b2c146cebfe73424473ce0f52c8c923bd5b1276aebb3af03da9fc7027e2027994663c47a5a4f5a4f3c4a997a322886ac43401ec
HEAD_REF master
PATCHES fix-dep.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS

View File

@ -1,6 +1,6 @@
{
"name": "polyhook2",
"version-date": "2024-02-08",
"version-date": "2024-06-03",
"description": "C++17, x86/x64 Hooking Library v2.0",
"homepage": "https://github.com/stevemk14ebr/PolyHook_2_0",
"license": "MIT",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "31ca0526f2e64a853da3f75e931a9b17c5af7014",
"version-date": "2024-06-28",
"port-version": 0
},
{
"git-tree": "e226149f3b22da2162e7d93eacc9f19411401e62",
"version-date": "2023-03-25",

View File

@ -269,7 +269,7 @@
"port-version": 7
},
"asmjit": {
"baseline": "2023-03-25",
"baseline": "2024-06-28",
"port-version": 0
},
"asmtk": {
@ -2670,7 +2670,7 @@
},
"fbgemm": {
"baseline": "0.4.1",
"port-version": 0
"port-version": 1
},
"fbthrift": {
"baseline": "2024.07.01.00",
@ -6953,7 +6953,7 @@
"port-version": 12
},
"polyhook2": {
"baseline": "2024-02-08",
"baseline": "2024-06-03",
"port-version": 0
},
"polymorphic-value": {

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "27b4707b88bb2ed527d372438c406d1a97323229",
"version": "0.4.1",
"port-version": 1
},
{
"git-tree": "e19b797fb42fad6dae0f9aca0890ddc62535800f",
"version": "0.4.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6039d71effaafe4610f614a64d90c84f386fa23b",
"version-date": "2024-06-03",
"port-version": 0
},
{
"git-tree": "2380bd82c3b07238558d4cfb7a2a38011b75faf5",
"version-date": "2024-02-08",