Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usewayland follow GLFW_BUILD_WAYLAND instead of _GLFW_WAYLAND #9

Open
duarm opened this issue Dec 11, 2023 · 1 comment
Open

usewayland follow GLFW_BUILD_WAYLAND instead of _GLFW_WAYLAND #9

duarm opened this issue Dec 11, 2023 · 1 comment

Comments

@duarm
Copy link

duarm commented Dec 11, 2023

After glfw/glfw@56a4cb0 , glfw can now use the GLFW_BUILD_X11 and GLFW_BUILD_WAYLAND defines to include x11/wayland support, both backends can now coexist and be dinamically selected when opening a window. We should do that instead of an if-else compiling only one backend

https://github.com/glfw/glfw/blob/46cebb5081820418f2a20f3e90b07f9b1bd44b42/src/CMakeLists.txt#L51

if (GLFW_BUILD_WAYLAND)
    target_compile_definitions(glfw PRIVATE _GLFW_WAYLAND)
    target_sources(glfw PRIVATE wl_platform.h xkb_unicode.h wl_init.c
                                wl_monitor.c wl_window.c xkb_unicode.c)
endif()
@duarm
Copy link
Author

duarm commented Mar 12, 2024

With the release of 3.8, both are now included by default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant