Textractor_test/vnrhook/CMakeLists.txt

60 lines
1.0 KiB
CMake
Raw Normal View History

2018-09-03 00:48:43 +08:00
include_directories(. util)
2018-07-21 03:10:34 +08:00
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
2018-08-08 03:44:13 +08:00
set(vnrhook_src
2018-08-23 23:53:23 +08:00
main.cc
pipe.cc
util/ithsys/ithsys.cc
hijack/texthook.cc
2018-08-08 03:44:13 +08:00
)
else()
set(vnrhook_src
2018-08-23 23:53:23 +08:00
main.cc
pipe.cc
engine/engine.cc
engine/match.cc
engine/pchooks.cc
hijack/texthook.cc
util/util.cc
util/ithsys/ithsys.cc
util/disasm/disasm.cc
util/memdbg/memsearch.cc
)
endif()
2018-09-03 00:48:43 +08:00
add_subdirectory(libminhook)
add_library(vnrhook SHARED ${vnrhook_src})
enable_language(ASM_MASM)
set_source_files_properties(
${PROJECT_SOURCE_DIR}/winseh/safeseh.asm
PROPERTIES
# CMAKE_ASM_MASM_FLAGS /safeseh # CMake bug 14711: http://www.cmake.org/Bug/view.php?id=14711
COMPILE_FLAGS /safeseh
)
set_target_properties(vnrhook PROPERTIES
LINK_FLAGS "/SUBSYSTEM:WINDOWS /MANIFEST:NO"
)
target_compile_options(vnrhook PRIVATE
/EHa
$<$<CONFIG:Release>:>
$<$<CONFIG:Debug>:>
)
set(vnrhook_libs
Version.lib
2018-08-24 23:33:01 +08:00
minhook
)
target_link_libraries(vnrhook ${vnrhook_libs})
target_compile_definitions(vnrhook
PRIVATE
ITH_HAS_CRT
ITH_HAS_SEH
_CRT_NON_CONFORMING_SWPRINTFS
2018-07-23 09:33:45 +08:00
)