CMake: Allow disabling Wayland support with USE_WAYLAND_WSI#11537
CMake: Allow disabling Wayland support with USE_WAYLAND_WSI#11537hrydgard merged 1 commit intohrydgard:masterfrom
Conversation
CMakeLists.txt
Outdated
| 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.
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.
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.