Add FindXorgServer.cmake and use it for touchpad KCM
ClosedPublic

Authored by asturmlechner on May 7 2020, 6:25 PM.

Details

Summary

x11 backend of the touchpad KCM uses xserver-properties.h that is part of
xorg-server package. As XORG_INCLUDE_DIRS seems to be empty, so far, it was
relying on Synaptics_INCLUDE_DIRS implicitly and worked only if the header
happened to be in the same directory as Synaptics' which is the case most of
the time.

FindXorgServer.cmake is just a copy of FindXorgLibinput, adapted accordingly.

Test Plan

Pointed Synaptics_INCLUDE_DIRS somewhere else than /usr/include/xorg and build
succeeded.

Diff Detail

Repository
R119 Plasma Desktop
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 26527
Build 26545: arc lint + arc unit
asturmlechner created this revision.May 7 2020, 6:25 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 7 2020, 6:25 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
asturmlechner requested review of this revision.May 7 2020, 6:25 PM
zzag accepted this revision.May 7 2020, 7:17 PM
This revision is now accepted and ready to land.May 7 2020, 7:17 PM
asturmlechner closed this revision.May 7 2020, 7:19 PM
ngraham added a subscriber: ngraham.May 7 2020, 7:53 PM

Hmm, on my system, the file is located at /usr/src/xserver/include/xserver-properties.h, and this doesn't seen to find it:

-- The following features have been disabled:

 * XorgServer, XServer header needed for touchpad KCM (X11 backend)

-- The following OPTIONAL packages have not been found:

 * XorgServer, XServer header needed for touchpad KCM (X11 backend)

Hmm, on my system, the file is located at /usr/src/xserver/include/xserver-properties.h, and this doesn't seen to find it:

Where is synaptics-properties.h located on your system, if you even have been building touchpad kcm so far?

Hmm, on my system, the file is located at /usr/src/xserver/include/xserver-properties.h, and this doesn't seen to find it:

Where is synaptics-properties.h located on your system, if you even have been building touchpad kcm so far?

It's in /usr/include/xorg.

I must confess I've never actually been able to build it, so I appreciate your efforts here to fix that.

What I'd really like is the ability to build just the libinput one if I don't have the synaptics dev stuff installed.

Hmm, on my system, the file is located at /usr/src/xserver/include/xserver-properties.h, and this doesn't seen to find it:

Where is synaptics-properties.h located on your system, if you even have been building touchpad kcm so far?

It's in /usr/include/xorg.

I must confess I've never actually been able to build it, so I appreciate your efforts here to fix that.

In that case yes it must have failed so far during build, now cmake will warn you already. It is now the same as with Evdev, Libinput and Synaptics, if you don't have them in system paths you would have to somehow feed the alternative paths to cmake.

What I'd really like is the ability to build just the libinput one if I don't have the synaptics dev stuff installed.

Me too, unfortunately that will take a bit more work untangling the bits. In our source package I use this patch which enables me to bundle only the four headers and get rid of them as build dependencies, then point cmake to the bundle dir: https://gitweb.gentoo.org/repo/gentoo.git/tree/kde-plasma/plasma-desktop/files/plasma-desktop-5.18.5-override-include-dirs.patch

zzag added a comment.May 7 2020, 8:27 PM

Hmm, on my system, the file is located at /usr/src/xserver/include/xserver-properties.h, and this doesn't seen to find it:

What distro are you running?

cblack added a subscriber: cblack.May 7 2020, 8:30 PM

Hmm, on my system, the file is located at /usr/src/xserver/include/xserver-properties.h, and this doesn't seen to find it:

-- The following features have been disabled:

 * XorgServer, XServer header needed for touchpad KCM (X11 backend)

-- The following OPTIONAL packages have not been found:

 * XorgServer, XServer header needed for touchpad KCM (X11 backend)

That's the source package location, not where you'd expect to find the headers for usage by other packages. You'd probably be looking for /usr/include/xorg/xserver-properties.h.

That's the source package location, not where you'd expect to find the headers for usage by other packages. You'd probably be looking for /usr/include/xorg/xserver-properties.h.

It isn't in there on openSUSE TW.

Never mind, @zzag discovered that I didn't have the xorg-x11-server-sdk package installed, so nothing to see here, and sorry for the noise!