2014-11-10 15:04:40 -08:00
|
|
|
project(graphics-hook)
|
|
|
|
|
2016-10-29 08:25:08 -07:00
|
|
|
set(COMPILE_D3D12_HOOK FALSE CACHE BOOL "Compile D3D12 hook support (required windows 10 SDK)")
|
|
|
|
|
|
|
|
configure_file(
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/graphics-hook-config.h.in"
|
|
|
|
"${CMAKE_BINARY_DIR}/plugins/win-capture/graphics-hook/config/graphics-hook-config.h")
|
|
|
|
|
|
|
|
|
2014-11-10 15:04:40 -08:00
|
|
|
set(graphics-hook_HEADERS
|
2016-10-29 08:25:08 -07:00
|
|
|
"${CMAKE_BINARY_DIR}/plugins/win-capture/graphics-hook/config/graphics-hook-config.h"
|
2014-11-10 15:04:40 -08:00
|
|
|
graphics-hook.h
|
|
|
|
../graphics-hook-info.h
|
|
|
|
../hook-helpers.h
|
|
|
|
../funchook.h
|
|
|
|
../obfuscate.h
|
|
|
|
gl-decs.h
|
|
|
|
d3d9-patches.hpp)
|
|
|
|
|
|
|
|
set(graphics-hook_SOURCES
|
|
|
|
graphics-hook.c
|
|
|
|
../funchook.c
|
|
|
|
../obfuscate.c
|
|
|
|
gl-capture.c
|
2015-02-06 09:43:24 -08:00
|
|
|
d3d8-capture.cpp
|
2014-11-10 15:04:40 -08:00
|
|
|
d3d9-capture.cpp
|
|
|
|
dxgi-capture.cpp
|
|
|
|
d3d10-capture.cpp
|
2016-10-29 08:25:08 -07:00
|
|
|
d3d11-capture.cpp
|
|
|
|
d3d12-capture.cpp)
|
2014-11-10 15:04:40 -08:00
|
|
|
|
2016-11-23 05:55:25 -08:00
|
|
|
if(MSVC)
|
|
|
|
add_compile_options("$<$<CONFIG:RelWithDebInfo>:/MT>")
|
|
|
|
endif()
|
|
|
|
|
2014-11-10 15:04:40 -08:00
|
|
|
add_library(graphics-hook MODULE
|
|
|
|
${graphics-hook_SOURCES}
|
|
|
|
${graphics-hook_HEADERS})
|
|
|
|
|
2016-10-29 08:25:08 -07:00
|
|
|
target_include_directories(graphics-hook PUBLIC
|
|
|
|
"${CMAKE_BINARY_DIR}/plugins/win-capture/graphics-hook/config")
|
|
|
|
|
2014-11-10 15:04:40 -08:00
|
|
|
target_link_libraries(graphics-hook
|
2015-02-04 23:17:56 -08:00
|
|
|
ipc-util psapi)
|
2014-11-10 15:04:40 -08:00
|
|
|
|
|
|
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
|
|
set(_output_suffix "64")
|
|
|
|
else()
|
|
|
|
set(_output_suffix "32")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set_target_properties(graphics-hook
|
|
|
|
PROPERTIES
|
|
|
|
OUTPUT_NAME "graphics-hook${_output_suffix}")
|
|
|
|
|
|
|
|
install_obs_datatarget(graphics-hook "obs-plugins/win-capture")
|