aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/polyhook2
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/polyhook2
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/polyhook2')
-rw-r--r--vcpkg/ports/polyhook2/portfile.cmake44
-rw-r--r--vcpkg/ports/polyhook2/vcpkg.json55
2 files changed, 99 insertions, 0 deletions
diff --git a/vcpkg/ports/polyhook2/portfile.cmake b/vcpkg/ports/polyhook2/portfile.cmake
new file mode 100644
index 0000000..88201a1
--- /dev/null
+++ b/vcpkg/ports/polyhook2/portfile.cmake
@@ -0,0 +1,44 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO stevemk14ebr/PolyHook_2_0
+ REF 4c8872e207e76ea43fd23f802e3bf5acb43fee8a
+ SHA512 f3baec4fc99e90221ce1b663c4fa10516a16c777135cca457e4b1de5e121c87b6a8eb5ac6392b75ee1c41e9e5a15a73171136fd3adfb3ff51ffaf0f909c58dd3
+ HEAD_REF master
+)
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ exception POLYHOOK_FEATURE_EXCEPTION
+ detours POLYHOOK_FEATURE_DETOURS
+ inlinentd POLYHOOK_FEATURE_INLINENTD
+ pe POLYHOOK_FEATURE_PE
+ virtuals POLYHOOK_FEATURE_VIRTUALS
+)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIB)
+
+if (VCPKG_CRT_LINKAGE STREQUAL "static")
+ set(BUILD_STATIC_RUNTIME ON)
+else()
+ set(BUILD_STATIC_RUNTIME OFF)
+endif()
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS ${FEATURE_OPTIONS}
+ -DPOLYHOOK_BUILD_SHARED_LIB=${BUILD_SHARED_LIB}
+ -DPOLYHOOK_BUILD_STATIC_RUNTIME=${BUILD_STATIC_RUNTIME}
+ -DPOLYHOOK_USE_EXTERNAL_ASMJIT=ON
+ -DPOLYHOOK_USE_EXTERNAL_ASMTK=ON
+ -DPOLYHOOK_USE_EXTERNAL_ZYDIS=ON
+)
+
+vcpkg_cmake_install()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_copy_pdbs()
+vcpkg_cmake_config_fixup(PACKAGE_NAME PolyHook_2 CONFIG_PATH lib/PolyHook_2)
+
+# Handle copyright
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/polyhook2/vcpkg.json b/vcpkg/ports/polyhook2/vcpkg.json
new file mode 100644
index 0000000..012d80e
--- /dev/null
+++ b/vcpkg/ports/polyhook2/vcpkg.json
@@ -0,0 +1,55 @@
+{
+ "name": "polyhook2",
+ "version-date": "2025-06-21",
+ "description": "C++17, x86/x64 Hooking Library v2.0",
+ "homepage": "https://github.com/stevemk14ebr/PolyHook_2_0",
+ "license": "MIT",
+ "supports": "(x86 | x64) & !(uwp | osx)",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ },
+ "zydis"
+ ],
+ "default-features": [
+ "detours",
+ {
+ "name": "exception",
+ "platform": "windows"
+ },
+ "inlinentd",
+ {
+ "name": "pe",
+ "platform": "windows"
+ },
+ "virtuals"
+ ],
+ "features": {
+ "detours": {
+ "description": "Implement detour functionality",
+ "dependencies": [
+ "asmtk"
+ ]
+ },
+ "exception": {
+ "description": "Implement all exception hooking functionality"
+ },
+ "inlinentd": {
+ "description": "Support inline hooks without specifying typedefs by generating callback stubs at runtime with AsmJit",
+ "dependencies": [
+ "asmjit"
+ ]
+ },
+ "pe": {
+ "description": "Implement all win pe hooking functionality"
+ },
+ "virtuals": {
+ "description": "Implement all virtual table hooking functionality"
+ }
+ }
+}