Textractor_test/texthook/CMakeLists.txt

52 lines
1.1 KiB
CMake
Raw Normal View History

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)
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-10 13:58:19 -04:00
add_library(texthook MODULE ${texthook_src})
2021-11-08 07:07:34 -07:00
# isn't there a better way to do this?
target_precompile_headers(texthook PRIVATE ../include/common.h)
2021-11-08 07:07:34 -07: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 02:09:17 -04:00
target_link_libraries(texthook minhook)