diff options
Diffstat (limited to 'vcpkg/ports/minhook')
| -rw-r--r-- | vcpkg/ports/minhook/fix-usage.patch | 10 | ||||
| -rw-r--r-- | vcpkg/ports/minhook/portfile.cmake | 31 | ||||
| -rw-r--r-- | vcpkg/ports/minhook/vcpkg.json | 18 |
3 files changed, 59 insertions, 0 deletions
diff --git a/vcpkg/ports/minhook/fix-usage.patch b/vcpkg/ports/minhook/fix-usage.patch new file mode 100644 index 0000000..198b879 --- /dev/null +++ b/vcpkg/ports/minhook/fix-usage.patch @@ -0,0 +1,10 @@ +diff --git a/cmake/minhook-config.cmake.in b/cmake/minhook-config.cmake.in
+index 14e6463..28fa17c 100644
+--- a/cmake/minhook-config.cmake.in
++++ b/cmake/minhook-config.cmake.in
+@@ -36,4 +36,4 @@ set(MINHOOK_FOUND ON)
+ set_and_check(MINHOOK_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include/")
+ set_and_check(MINHOOK_LIBRARY_DIRS "${PACKAGE_PREFIX_DIR}/lib")
+
+-include("${PACKAGE_PREFIX_DIR}/lib/minhook/minhook-targets.cmake")
++include("${CMAKE_CURRENT_LIST_DIR}/minhook-targets.cmake")
diff --git a/vcpkg/ports/minhook/portfile.cmake b/vcpkg/ports/minhook/portfile.cmake new file mode 100644 index 0000000..230002b --- /dev/null +++ b/vcpkg/ports/minhook/portfile.cmake @@ -0,0 +1,31 @@ +if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86")
+ set(BUILD_ARCH "Win32")
+ set(OUTPUT_DIR "Win32")
+elseif (VCPKG_TARGET_ARCHITECTURE MATCHES "x64")
+ set(BUILD_ARCH "x64")
+ set(OUTPUT_DIR "Win64")
+else()
+ message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}")
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO TsudaKageyu/minhook
+ REF "v${VERSION}"
+ SHA512 8a33233598b56ad9da44d22d470c2432f68364dac31bc719fcd6b085e681fa10ddd41865fbde056ee7f4e7a075cc135344b6bf444eadbd7e7314ee1bedfd89b5
+ HEAD_REF master
+ PATCHES
+ fix-usage.patch
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/minhook)
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
diff --git a/vcpkg/ports/minhook/vcpkg.json b/vcpkg/ports/minhook/vcpkg.json new file mode 100644 index 0000000..efc79e1 --- /dev/null +++ b/vcpkg/ports/minhook/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "minhook", + "version": "1.3.4", + "description": "The Minimalistic x86/x64 API Hooking Library for Windows.", + "homepage": "https://github.com/TsudaKageyu/minhook", + "license": "BSD-2-Clause", + "supports": "windows & !uwp & !arm", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |