Fix building plasma-desktop without X11 cursor development headers
AbandonedPublic

Authored by ouwerkerk on Jan 1 2020, 3:50 PM.

Details

Reviewers
davidedmundson
Group Reviewers
Plasma
Summary

The lookandfeel KCM has a hard dependency on xcursor code of the cursor KCM.
This change updates the CMake code to reflect this hard dependency and avoid build failures when the X11 cursor headers are unavailable.

Test Plan

Compiling plasma-desktop with kdesrc-build works again without XCB cursor headers

Diff Detail

Repository
R119 Plasma Desktop
Branch
fix-build-without-cursors
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 20489
Build 20507: arc lint + arc unit
ouwerkerk created this revision.Jan 1 2020, 3:50 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 1 2020, 3:50 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ouwerkerk requested review of this revision.Jan 1 2020, 3:50 PM
ouwerkerk updated this revision to Diff 72544.Jan 1 2020, 4:09 PM

Fixed commit message typo

davidedmundson requested changes to this revision.Jan 1 2020, 11:42 PM
davidedmundson added a subscriber: davidedmundson.

That may fix the build, but it's a somewhat hamfisted approach, lookandfeel is a key KCM, we can't make that depend on an optional feature.

We need to either:

  • relevant #ifdef inside lookandfeel
  • just make the dependency mandatory
This revision now requires changes to proceed.Jan 1 2020, 11:42 PM

Right now the KCM CmakeListst does stuff like:

set(kcm_lookandfeel_SRCS
  kcmmain.cpp
  kcm.cpp
  ../krdb/krdb.cpp
  ../cursortheme/xcursor/cursortheme.cpp
  ../cursortheme/xcursor/xcursortheme.cpp
)

And the main kcm.cpp simply includes cursor deps without #ifdef.
It's not impossible to rework that so all the cursor related setters/getters are effectively hidden behind #ifdef however, so the question becomes: do we want that? I.e. do we genuinely want to use the lookandfeel KCM on platforms without mouse cursors?

Otherwise it is a lot less work to go for the easy solution of making X11 cursor dependencies mandatory if we want to ensure the lookandfeel KCM is always built.