Do not skip searching for X11 and Wayland modules on Windows
Review Request #120481 - Created Oct. 3, 2014 and submitted
While the search is unlikely to succeed on Windows, having different
behaviour between the platforms (eg: find_package(Wayland REQUIRED) was
not fatal on Windows, even though Wayland_FOUND would always be FALSE)
is not ideal, and if someone did port them to Windows for some reason,
the find modules should support that.
If applications actually want different behaviour between platforms
(like requiring a module on Unix, but not on Windows), they should
implement that logic themselves (since they will have to deal with
targets not being defined, etc, anyway).
None whatsoever, since I want Martin's feedback on the idea first.
Please also get the feedback from the windows developers.
For Wayland I'm fine with the change - it should not exist for Windows and yes it should fail in that case. For the XCB one I'm a little bit doubtful in what it might result in. XCB should be available on Windows through the cygwin project, so in theory it might be possible to compile on Windows (and OSX) with XCB support. My fear is that incorrect usage downstream might result in undefined behavior if XCB is found. We still have too many incorrect ports from the old #ifdef Q_WS_X11 without a proper runtime check. So on that part we need the opinion of the Windows developers on how dangerous this could be.
Well, I have two different things in mind: first of all, I can see the point of simplification, I doubt that it will be interesting though to build KDE in the near (next 5y) future with X11/Wayland. Second, the X11 situation is normally abstracted by Qt, so there is nearly never a need to have X11 code on windows, we don't build most of the stuff. And third, it is easy to add a REQUIRED in the find_package line, because normally developers don't think twice (This is linux after all, why shouldn't it have X11?!???). This will likely produce some errors, although I am not sure how severe this will be. So I am not really for it, but I am also not against it.