fix(cmake/windows): static link MinHook (#3537)
This commit is contained in:
@@ -4,9 +4,9 @@
|
|||||||
find_package(nlohmann_json CONFIG 3.11 REQUIRED)
|
find_package(nlohmann_json CONFIG 3.11 REQUIRED)
|
||||||
|
|
||||||
# Make sure MinHook is installed
|
# Make sure MinHook is installed
|
||||||
find_library(MINHOOK_LIBRARY minhook REQUIRED)
|
find_library(MINHOOK_LIBRARY libMinHook.a REQUIRED)
|
||||||
find_path(MINHOOK_INCLUDE_DIR MinHook.h PATH_SUFFIXES include REQUIRED)
|
find_path(MINHOOK_INCLUDE_DIR MinHook.h PATH_SUFFIXES include REQUIRED)
|
||||||
|
|
||||||
add_library(minhook::minhook UNKNOWN IMPORTED)
|
add_library(minhook::minhook STATIC IMPORTED)
|
||||||
set_property(TARGET minhook::minhook PROPERTY IMPORTED_LOCATION ${MINHOOK_LIBRARY})
|
set_property(TARGET minhook::minhook PROPERTY IMPORTED_LOCATION ${MINHOOK_LIBRARY})
|
||||||
target_include_directories(minhook::minhook INTERFACE ${MINHOOK_INCLUDE_DIR})
|
target_include_directories(minhook::minhook INTERFACE ${MINHOOK_INCLUDE_DIR})
|
||||||
|
|||||||
Reference in New Issue
Block a user