CMake: Build GLFW with X11/Wayland support to match Dawn

Otherwise on Wayland-only systems, the GLFW CMake files might still be
looking for X11 when DAWN_USE_X11 is off.

Fixed: dawn:1806
Change-Id: I893f5412efeb3cfa48738b224b455b5fc189809d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132221
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Corentin Wallez 2023-05-15 13:01:16 +00:00 committed by Dawn LUCI CQ
parent 0699b4f21d
commit 978bc129a0
1 changed files with 2 additions and 0 deletions

View File

@ -78,6 +78,8 @@ if (NOT TARGET glfw AND DAWN_SUPPORTS_GLFW_FOR_WINDOWING)
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_X11 ${DAWN_USE_X11} CACHE BOOL "" FORCE)
set(GLFW_BUILD_WAYLAND ${DAWN_USE_WAYLAND} CACHE BOOL "" FORCE)
message(STATUS "Dawn: using GLFW at ${DAWN_GLFW_DIR}")
add_subdirectory(${DAWN_GLFW_DIR} "${CMAKE_CURRENT_BINARY_DIR}/glfw")