From 474324e1f56ee02835129f957576a6ab7914f284 Mon Sep 17 00:00:00 2001 From: loki Date: Sat, 18 Jan 2020 21:16:00 +0100 Subject: [PATCH] compile ViGEmClient --- .gitmodules | 3 +++ CMakeLists.txt | 11 +++++++++-- ViGEmClient | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) create mode 160000 ViGEmClient diff --git a/.gitmodules b/.gitmodules index ce0ede82..93af2e68 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "Simple-Web-Server"] path = Simple-Web-Server url = https://github.com/loki-47-6F-64/Simple-Web-Server.git +[submodule "ViGEmClient"] + path = ViGEmClient + url = https://github.com/ViGEm/ViGEmClient diff --git a/CMakeLists.txt b/CMakeLists.txt index 4dd50565..91ef2354 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,17 +13,23 @@ find_package(OpenSSL REQUIRED) find_package(FFmpeg REQUIRED) if(WIN32) + include_directories( + ViGEmClient/include) set(PLATFORM_TARGET_FILES sunshine/platform/windows.cpp sunshine/platform/windows_dxgi.cpp - sunshine/platform/windows_wasapi.cpp) + sunshine/platform/windows_wasapi.cpp + ViGEmClient/src/ViGEmClient.cpp) set(PLATFORM_LIBRARIES winmm ksuser wsock32 ws2_32 windowsapp - d3d11 dxgi) + d3d11 dxgi + setupapi) + set_source_files_properties(ViGEmClient/src/ViGEmClient.cpp PROPERTIES COMPILE_DEFINITIONS "UNICODE=1;ERROR_INVALID_DEVICE_OBJECT_PARAMETER=650") + set_source_files_properties(ViGEmClient/src/ViGEmClient.cpp PROPERTIES COMPILE_FLAGS "-Wno-unknown-pragmas -Wno-misleading-indentation -Wno-class-memaccess") else() set(Boost_USE_STATIC_LIBS ON) find_package(X11 REQUIRED) @@ -96,6 +102,7 @@ include_directories( ) list(APPEND SUNSHINE_COMPILE_OPTIONS -fPIC -Wall -Wno-missing-braces -Wno-maybe-uninitialized -Wno-sign-compare) + string(TOUPPER "x${CMAKE_BUILD_TYPE}" BUILD_TYPE) if("${BUILD_TYPE}" STREQUAL "XDEBUG") list(APPEND SUNSHINE_COMPILE_OPTIONS -O0 -pedantic -ggdb3) diff --git a/ViGEmClient b/ViGEmClient new file mode 160000 index 00000000..52682b59 --- /dev/null +++ b/ViGEmClient @@ -0,0 +1 @@ +Subproject commit 52682b59c458388a74afbc3d7ef23de21983a86f