Only build with Wayland if USE_WAYLAND_WSI is on.

This commit is contained in:
Anthony J. Bentley 2023-09-19 02:07:46 -06:00
parent 3c4872b9ae
commit 25a7334b5f

View File

@ -188,10 +188,9 @@ if(UNIX AND NOT (APPLE OR ANDROID) AND VULKAN)
find_package(Wayland)
if(NOT WAYLAND_FOUND)
message(STATUS "Could not find Wayland libraries, disabling Wayland WSI support for Vulkan.")
else()
elseif(USE_WAYLAND_WSI)
include_directories(${WAYLAND_INCLUDE_DIR})
add_definitions(-DVK_USE_PLATFORM_WAYLAND_KHR)
add_definitions(-DUSE_WAYLAND_WSI=ON)
endif()
if(USE_VULKAN_DISPLAY_KHR)