add_library(coop_hook SHARED
	src/dllmain.cpp
	src/xinput_hook.cpp)

target_include_directories(coop_hook PRIVATE src)

target_link_libraries(coop_hook PRIVATE
	coop_common
	safetyhook::safetyhook)

set_target_properties(coop_hook PROPERTIES OUTPUT_NAME "coop_hook")

# TODO(dist): statically link the VC runtime (/MT) so the DLL loads in games on
# machines without the matching VC redist. Deferred until SafetyHook + Zydis are
# also forced to a static CRT to avoid a /MT-vs-/MD mismatch.
