2018-07-21 03:10:34 +08:00
|
|
|
project(engine)
|
|
|
|
|
2016-01-05 23:01:17 +08:00
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
|
|
|
|
set(vnrhook_src
|
|
|
|
include/const.h
|
|
|
|
include/defs.h
|
|
|
|
include/types.h
|
|
|
|
src/except.h
|
|
|
|
src/main.cc
|
|
|
|
src/main.h
|
|
|
|
src/pipe.cc
|
|
|
|
src/engine/engine.cc
|
|
|
|
src/engine/engine.h
|
|
|
|
src/engine/hookdefs.h
|
|
|
|
src/engine/match.cc
|
|
|
|
src/engine/match.h
|
|
|
|
src/engine/pchooks.cc
|
|
|
|
src/engine/pchooks.h
|
|
|
|
src/engine/mono/funcinfo.h
|
|
|
|
src/engine/mono/types.h
|
|
|
|
src/engine/ppsspp/funcinfo.h
|
|
|
|
src/hijack/texthook.cc
|
|
|
|
src/hijack/texthook.h
|
|
|
|
src/util/growl.h
|
|
|
|
src/util/util.cc
|
|
|
|
src/util/util.h
|
2018-07-21 05:50:19 +08:00
|
|
|
src/util/ithsys/ithsys.cc
|
|
|
|
src/util/disasm/disasm.cc
|
|
|
|
src/util/memdbg/memdbg.h
|
|
|
|
src/util/memdbg/memsearch.cc
|
|
|
|
src/util/memdbg/memsearch.h
|
|
|
|
src/util/mono/monoobject.h
|
|
|
|
src/util/mono/monotype.h
|
2016-01-05 23:01:17 +08:00
|
|
|
)
|
|
|
|
|
2018-07-21 05:50:19 +08:00
|
|
|
include_directories(src/util)
|
|
|
|
|
2016-01-05 23:01:17 +08:00
|
|
|
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
|
2018-07-23 09:33:45 +08:00
|
|
|
$<$<CONFIG:Release>:/MT>
|
2016-01-05 23:01:17 +08:00
|
|
|
$<$<CONFIG:Debug>:>
|
|
|
|
)
|
|
|
|
|
|
|
|
set(vnrhook_libs
|
2018-07-21 23:22:32 +08:00
|
|
|
ntdll.lib
|
2016-01-05 23:01:17 +08:00
|
|
|
Version.lib
|
|
|
|
)
|
|
|
|
|
|
|
|
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
|
|
|
)
|