fix(xmake): compile GLFW Wayland backend on Linux - #66
Merged
Conversation
What: run wayland-scanner and compile Wayland sources for eui_glfw with X11 fallback. Why: eui_glfw was configured with X11 sources only on Linux, losing Wayland auto-detection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
wayland-scannerprotocol code generation and compile Wayland backend sources (wl_init.c,wl_monitor.c,wl_window.c) intoeui_glfwon Linux._GLFW_WAYLAND+_GLFW_X11) with graceful fallback to X11-only if Wayland development packages are absent.Why
x11_*.c) with_GLFW_X11, preventing applications from running natively under Wayland compositors and forcing them into XWayland.How
eui_glfw'son_load, probe forwayland-scanner,wayland-client, andxkbcommon.3rd/glfw/deps/wayland/*.xmlintotarget:autogendir(), add_GLFW_WAYLAND, append Wayland source files, and link client libraries.Rationale & Reference
3rd/glfw/src/CMakeLists.txt(lines 66–107), which generates protocol headers from3rd/glfw/deps/wayland/*.xmlusingwayland-scanner(client-headerandprivate-code) and enables both Wayland and X11 by default.3rd/glfw/deps/wayland/.WAYLAND_DISPLAYatglfwInit()and prefers native Wayland while dynamically loading client libraries viadlopen.wayland-scanneror Wayland packages are missing, the target silently falls back to pure X11 without failing configuration or compilation.