-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
CMake: Allow disabling Wayland support with USE_WAYLAND_WSI #11537
Conversation
CMakeLists.txt
Outdated
@@ -134,7 +134,7 @@ option(USE_FFMPEG "Build with FFMPEG support" ${USE_FFMPEG}) | |||
option(USE_SYSTEM_SNAPPY "Dynamically link against system snappy" ${USE_SYSTEM_SNAPPY}) | |||
option(USE_SYSTEM_FFMPEG "Dynamically link against system FFMPEG" ${USE_SYSTEM_FFMPEG}) | |||
option(USE_SYSTEM_LIBZIP "Dynamically link against system libzip" ${USE_SYSTEM_LIBZIP}) | |||
option(USE_WAYLAND_WSI "Set to ON to require Wayland support for Vulkan" ${USE_WAYLAND_WSI}) | |||
option(USE_WAYLAND_WSI "Set to ON to require Wayland support for Vulkan" ON) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this change intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what ${USE_WAYLAND_WSI}
would resolve to if users don't specify anything - my intention was that Wayland support is tested by default as it used to be.
But indeed I see now that the patch would as the possible scenarios are now:
USE_WAYLAND_WSI=ON
(default): Test for Wayland, if found, ok (like before)USE_WAYLAND_WSI=ON
(default): Test for Wayland, if not found, fatal error (like before)USE_WAYLAND_WSI=OFF
: Don't test for Wayland (new)
So we no longer have the previous scenario which was:
USE_WAYLAND_WSI=OFF
(default): Test for Wayland, if not found, continue silently
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish CMake had a "on/off/auto" switch like autotools (and it's not often that I wish for autotools-like things :P).
Alright, I think this should be fine. Let's wait for the buildbot to go green before merge. |
I'll just tweak the hint string for |
Yeah CI fails, and any build against older SDL2 or without Wayland libraries would fail too, that's probably not a good change as is. Alternatively I could drop the fatal error, so that the scenarios are:
|
BTW should I move the option up near |
This change means that USE_WAYLAND_WSI=ON no longer triggers a fatal error if Wayland libraries are missing though, it will just show a message and continue building without Wayand WSI support. Closes hrydgard#11536.
3160828
to
3bc89f3
Compare
I've pushed an updated version which does what I describe in #11537 (comment). |
Seems ok. |
Closes #11536.