Search properly for pipewire and other libs
ClosedPublic

Authored by jgrulich on Apr 12 2018, 1:04 PM.

Details

Summary

We cannot rely on pkgconfig only so use more advanced search for libs
required by screencast portal

Diff Detail

Repository
R838 Flatpak Support: KDE Portal for XDG Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jgrulich requested review of this revision.Apr 12 2018, 1:04 PM
jgrulich created this revision.
jgrulich added a subscriber: Plasma.

Findpipewire.cmake and Findspa.cmake are copies of Findgbm.cmake and just modified accordingly, Findglib.cmake is copied from webkit.

jgrulich updated this revision to Diff 31971.Apr 12 2018, 1:06 PM

Remove leftover from another review

cgiboudeaux added inline comments.Apr 12 2018, 1:40 PM
CMakeLists.txt
28–38

GLib

34

Spa (see below)

39–40

unrelated to this request but the file should be called FindGBM.cmake and the vars changed

40

PipeWire

cmake/modules/Findglib.cmake
1 ↗(On Diff #31971)

The file should be renamed FindGLib.cmake and the variables be changed

4–6 ↗(On Diff #31971)

GLib_FOUND, GLib_INCLUDE_DIRS, GLIB_LIBRARIES...

13–16 ↗(On Diff #31971)

GIO
GObject
GModule
GThread

cmake/modules/Findpipewire.cmake
2 ↗(On Diff #31971)

FindPipeWire and rename the file and variables

62–67 ↗(On Diff #31971)

Not needed, the file is not installed and the module already requires 2.8.12

69 ↗(On Diff #31971)

Remove

78 ↗(On Diff #31971)

PipeWire_INCLUDE_DIRS

85 ↗(On Diff #31971)

PipeWire_LIBRARIES

114–117 ↗(On Diff #31971)

Remove, this is a new module, you don't need compat vars

cmake/modules/Findspa.cmake
2 ↗(On Diff #31971)

FindSPA (and rename the vars and the file)

9 ↗(On Diff #31971)

SPA_FOUND

13 ↗(On Diff #31971)

SPA_LIBRARIES (and same thing for the other vars)

62–67 ↗(On Diff #31971)

Not needed, the module already requires 2.8.12 and this file is not installed.

69 ↗(On Diff #31971)

Not needed. Remove this line (& the matching endif())

114–117 ↗(On Diff #31971)

This module is new, you don't need compat variables.
However, please use SPA_LIBRARIES, SPA_INCLUDE_DIRS instead of SPA_LIBRARY SPA_INCLUDE_DIR in this file.

src/CMakeLists.txt
6

Not needed for gbm, SPA and PipeWire, you created targets

51–52

PipeWire::PipeWire

52

Spa::Spa

52–56

why ?

53

GLIB_LIBRARIES was fine (well, GLib_LIBRARIES once the file is fixed)

jgrulich updated this revision to Diff 32041.Apr 13 2018, 8:36 AM

Fix naming of cmake modules

@cgiboudeaux are the cmake modules correct now?

jgrulich updated this revision to Diff 32455.Apr 18 2018, 9:47 AM

Remove custom GLib cmake module and fix module naming

cgiboudeaux accepted this revision.Apr 18 2018, 9:58 AM

Thanks. Please push, I'll fix the remaining issues

This revision is now accepted and ready to land.Apr 18 2018, 9:58 AM
This revision was automatically updated to reflect the committed changes.