Hide the Linux specific parts behind a operating system check.
ClosedPublic

Authored by tcberner on Jul 23 2017, 10:05 AM.

Details

Summary

Patches by bcooksley

Test Plan

I'm building it atm, but it should be fine :)

Diff Detail

Repository
R108 KWin
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
tcberner created this revision.Jul 23 2017, 10:05 AM
Restricted Application added a project: KWin. · View Herald TranscriptJul 23 2017, 10:05 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
graesslin requested changes to this revision.Jul 23 2017, 3:20 PM
graesslin added inline comments.
CMakeLists.txt
482

I would prefer to not go through system name, but rather on checking whether there is a specific header file available, or a symbol in the header

plugins/platforms/CMakeLists.txt
5

similar here.

This revision now requires changes to proceed.Jul 23 2017, 3:20 PM
tcberner added inline comments.Jul 23 2017, 3:32 PM
CMakeLists.txt
482

virtual_terminal.cpp explicitely does #include <linux/foo.h> -- so I think it makes sense here to match for Linux.

But we can also change it to check for for example linux/major.h.

plugins/platforms/CMakeLists.txt
5

Again, we could match for the presence of linux/fb.h

graesslin added inline comments.Jul 23 2017, 3:52 PM
CMakeLists.txt
482

I would prefer a check on the include instead of name just for being future proof. Who knows which distribution thinks about changing Linux to MyAwesomeBrandingName ;-) (and no, just in case someone things that: I'm not thinking of Ubuntu here)

plugins/platforms/CMakeLists.txt
5

yep, that sound good.

tcberner updated this revision to Diff 17072.Jul 23 2017, 5:09 PM
tcberner edited edge metadata.

Use checks for the headers

Output on FreeBSD is now

-- The following features have been disabled:

 * Wayland::EGL, Enable building of Wayland backend and QPA with EGL support.
 * linux/vt.h, Required for virtual terminal support under wayland
 * linux/fb.h, Required for the fbdev backend
tcberner marked 6 inline comments as done.Jul 23 2017, 5:10 PM
graesslin accepted this revision.Jul 24 2017, 2:17 PM
This revision is now accepted and ready to land.Jul 24 2017, 2:17 PM
This revision was automatically updated to reflect the committed changes.