Skip to content

Commit

Permalink
fix(cmake/windows): static link MinHook (LizardByte#3537)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrogTheFrog authored and qiin2333 committed Jan 16, 2025
1 parent 70116ef commit 4dc96e8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmake/dependencies/windows.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# windows specific dependencies

# nlohmann_json
pkg_check_modules(NLOHMANN_JSON nlohmann_json REQUIRED IMPORTED_TARGET)
find_package(nlohmann_json CONFIG 3.11 REQUIRED)

# Make sure MinHook is installed
find_library(MINHOOK_LIBRARY libMinHook.a REQUIRED)
find_path(MINHOOK_INCLUDE_DIR MinHook.h PATH_SUFFIXES include REQUIRED)

add_library(minhook::minhook STATIC IMPORTED)
set_property(TARGET minhook::minhook PROPERTY IMPORTED_LOCATION ${MINHOOK_LIBRARY})
target_include_directories(minhook::minhook INTERFACE ${MINHOOK_INCLUDE_DIR})

0 comments on commit 4dc96e8

Please sign in to comment.