From efda3f052c0d4872f35bf54fd4e41d920411e26b Mon Sep 17 00:00:00 2001 From: gucio321 <73652197+gucio321@users.noreply.github.com> Date: Tue, 18 Oct 2022 08:02:50 +0200 Subject: [PATCH] CMakeList: fix bug when building SDL version for Wayland and using Vulkan failed fix #16163 --- CMakeLists.txt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b9084bea3a..25d8d01f2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -184,14 +184,13 @@ if(UNIX AND NOT (APPLE OR ANDROID) AND VULKAN) endif() # add_definitions(-DVK_USE_PLATFORM_XCB_KHR) - if(USE_WAYLAND_WSI) - find_package(Wayland) - if(NOT WAYLAND_FOUND) - message(STATUS "Could not find Wayland libraries, disabling Wayland WSI support for Vulkan.") - else() - include_directories(${WAYLAND_INCLUDE_DIR}) - add_definitions(-DVK_USE_PLATFORM_WAYLAND_KHR) - endif() + find_package(Wayland) + if(NOT WAYLAND_FOUND) + message(STATUS "Could not find Wayland libraries, disabling Wayland WSI support for Vulkan.") + else() + include_directories(${WAYLAND_INCLUDE_DIR}) + add_definitions(-DVK_USE_PLATFORM_WAYLAND_KHR) + add_definitions(-DUSE_WAYLAND_WSI=ON) endif() if(USE_VULKAN_DISPLAY_KHR)