2021-11-07 05:54:34 -07:00
|
|
|
include_directories(. util minhook/include)
|
2018-07-20 15:10:34 -04:00
|
|
|
|
2019-02-16 03:17:16 -05:00
|
|
|
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
|
2021-11-07 05:54:34 -07:00
|
|
|
set(minhook_src
|
|
|
|
minhook/src/buffer.c
|
|
|
|
minhook/src/hook.c
|
|
|
|
minhook/src/trampoline.c
|
|
|
|
minhook/src/hde/hde64.c
|
|
|
|
)
|
|
|
|
set(texthook_src
|
|
|
|
main.cc
|
|
|
|
texthook.cc
|
|
|
|
hookfinder.cc
|
|
|
|
engine/match.cc
|
|
|
|
engine/match64.cc
|
|
|
|
engine/native/pchooks.cc
|
|
|
|
util/ithsys/ithsys.cc
|
|
|
|
util/util.cc
|
|
|
|
)
|
2018-08-19 00:13:19 -04:00
|
|
|
else()
|
2021-11-07 05:54:34 -07:00
|
|
|
set(minhook_src
|
|
|
|
minhook/src/buffer.c
|
|
|
|
minhook/src/hook.c
|
|
|
|
minhook/src/trampoline.c
|
|
|
|
minhook/src/hde/hde32.c
|
|
|
|
)
|
|
|
|
set(texthook_src
|
|
|
|
main.cc
|
|
|
|
texthook.cc
|
|
|
|
hookfinder.cc
|
|
|
|
engine/engine.cc
|
|
|
|
engine/match.cc
|
|
|
|
engine/match32.cc
|
|
|
|
engine/native/pchooks.cc
|
|
|
|
util/util.cc
|
|
|
|
util/ithsys/ithsys.cc
|
|
|
|
util/disasm/disasm.cc
|
|
|
|
util/memdbg/memsearch.cc
|
|
|
|
)
|
2018-08-19 00:13:19 -04:00
|
|
|
endif()
|
2016-01-06 00:01:17 +09:00
|
|
|
|
2021-11-07 05:54:34 -07:00
|
|
|
add_library(minhook ${minhook_src})
|
2019-06-10 13:58:19 -04:00
|
|
|
add_library(texthook MODULE ${texthook_src})
|
2021-11-07 05:54:34 -07:00
|
|
|
target_precompile_headers(texthook PRIVATE ../include/common.h)
|
|
|
|
if(NOT CMAKE_BUILD_TYPE MATCHES DEBUG)
|
|
|
|
target_compile_options(minhook PRIVATE /MT)
|
|
|
|
target_compile_options(texthook PRIVATE /MT)
|
|
|
|
target_link_options(texthook PRIVATE /NODEFAULTLIB:MSVCRT)
|
|
|
|
endif()
|
2019-06-02 02:09:17 -04:00
|
|
|
target_link_libraries(texthook minhook)
|