Textractor_test/texthook/CMakeLists.txt

52 lines
1.1 KiB
CMake
Raw Normal View History

include_directories(. util minhook/include)
2018-07-21 03:10:34 +08:00
2019-02-16 16:17:16 +08:00
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
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
)
else()
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
)
endif()
add_library(minhook ${minhook_src})
2019-06-11 01:58:19 +08:00
add_library(texthook MODULE ${texthook_src})
2021-11-08 22:07:34 +08:00
# isn't there a better way to do this?
target_precompile_headers(texthook PRIVATE ../include/common.h)
2021-11-08 22:07:34 +08:00
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 14:09:17 +08:00
target_link_libraries(texthook minhook)