Skip to content

Commit

Permalink
meson: Use implicit dependencies for required dependencies.
Browse files Browse the repository at this point in the history
The generated pkgconfig file for the library is incomplete, since application,
such as cog, only explicity depend on WPEBackend-fdo, though it also depends on
libwpe. It has not been a problem since wpe-webkit-1.0.pc explicity expose
libwpe requirement. Still, for robustness and self documentation, it's better to
express that dependency explicity too.

Also, this patch removes the pkg config version declation since it's also
handled implicitly by meson.

Previous pc file:

prefix=/usr
libdir=${prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include

Name: wpebackend-fdo-1.0
Description: The WPEBackend-fdo library
Version: 1.9.91
Libs: -L${libdir} -lWPEBackend-fdo-1.0
Cflags: -I${includedir}/wpe-fdo-1.0

New pc file:

prefix=/usr/local
libdir=${prefix}/lib
includedir=${prefix}/include

Name: wpebackend-fdo-1.0
Description: The WPEBackend-fdo library
Version: 1.9.1
Requires: wpe-1.0
Requires.private: xkbcommon, egl
Libs: -L${libdir} -lWPEBackend-fdo-1.0
Libs.private: -ldl
Cflags: -I${includedir}/wpe-fdo-1.0
  • Loading branch information
ceyusa authored and aperezdc committed Sep 2, 2021
1 parent ae6cf3f commit c99b7b9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,15 @@ add_project_arguments(
language: 'c'
)

wpe_dep = dependency('wpe-1.0', version: '>=1.6.0', fallback: ['libwpe', 'libwpe_dep'])

deps = [
dependency('epoxy'),
dependency('gio-2.0'),
dependency('gobject-2.0'),
dependency('wayland-client'),
dependency('wayland-server'),
dependency('wpe-1.0', version: '>=1.6.0', fallback: ['libwpe', 'libwpe_dep']),
wpe_dep,
]

# Will be set to the library dependency which provides the wl_egl_* functions.
Expand Down Expand Up @@ -348,8 +350,7 @@ import('pkgconfig').generate(
description: 'The WPEBackend-fdo library',
name: 'wpebackend-fdo-' + api_version,
subdirs: 'wpe-fdo-' + api_version,
libraries: lib,
version: meson.project_version(),
libraries: [lib, wpe_dep],
)

if get_option('build_docs')
Expand Down

0 comments on commit c99b7b9

Please sign in to comment.