From 92ce375e7a40b885bf33a13bbd2f2766bde4bcb7 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Fri, 12 Feb 2021 07:38:52 -0800 Subject: [PATCH] CMake: Correct headless build on Windows. --- CMakeLists.txt | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 36b17ef68c..75e3ce3f98 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2079,7 +2079,7 @@ set(NativeAssets if(HEADLESS) - add_executable(PPSSPPHeadless + set(HeadlessSource headless/Headless.cpp headless/StubHost.cpp headless/StubHost.h @@ -2088,6 +2088,25 @@ if(HEADLESS) headless/SDLHeadlessHost.cpp headless/SDLHeadlessHost.h ) + if(WIN32) + list(APPEND HeadlessSource + headless/WindowsHeadlessHost.cpp + headless/WindowsHeadlessHost.h + Windows/GPU/D3D9Context.cpp + Windows/GPU/D3D9Context.h + Windows/GPU/D3D11Context.cpp + Windows/GPU/D3D11Context.h + Windows/GPU/WindowsGLContext.cpp + Windows/GPU/WindowsVulkanContext.cpp + Windows/W32Util/ShellUtil.cpp + Windows/W32Util/ShellUtil.h + Windows/CaptureDevice.cpp + Windows/CaptureDevice.h + Windows/W32Util/Misc.cpp + Windows/W32Util/Misc.h + ) + endif() + add_executable(PPSSPPHeadless ${HeadlessSource}) target_link_libraries(PPSSPPHeadless ${COCOA_LIBRARY} ${QUARTZ_CORE_LIBRARY} ${LinkCommon}) setup_target_project(PPSSPPHeadless headless) endif()