From f06cc23e4c0d560221d7d42c5e46fd79b7f63ded Mon Sep 17 00:00:00 2001
From: James Le Cuirot <chewi@gentoo.org>
Date: Sun, 5 Jul 2026 10:41:20 +0100
Subject: [PATCH] build: Allow building with Vulkan but without Wayland

Signed-off-by: James Le Cuirot <chewi@gentoo.org>
--- a/cmake/compile_definitions/linux.cmake
+++ b/cmake/compile_definitions/linux.cmake
@@ -220,7 +220,6 @@ if(WAYLAND_FOUND)
     include_directories(
             SYSTEM
             ${WAYLAND_INCLUDE_DIRS}
-            ${CMAKE_BINARY_DIR}/generated-src
     )
 
     list(APPEND PLATFORM_LIBRARIES ${WAYLAND_LIBRARIES} gbm)
@@ -324,6 +323,9 @@ if (${SUNSHINE_BUILD_FLATPAK})
     list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_BUILD_FLATPAK=1)
 endif ()
 
+include_directories(SYSTEM
+        ${CMAKE_BINARY_DIR}/generated-src)
+
 list(APPEND PLATFORM_TARGET_FILES
         "${CMAKE_SOURCE_DIR}/src/platform/linux/publish.cpp"
         "${CMAKE_SOURCE_DIR}/src/platform/linux/graphics.h"
-- 
2.54.0

