Skip to content

Commit

Permalink
CMakeList: fix bug when building SDL version for Wayland and using Vu…
Browse files Browse the repository at this point in the history
…lkan failed

fix hrydgard#16163
  • Loading branch information
gucio321 committed Oct 18, 2022
1 parent 1aba331 commit efda3f0
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit efda3f0

Please sign in to comment.