summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksandermj@chromium.org>2022-11-28 10:52:04 +0000
committerAleksander Morgado <aleksander@aleksander.es>2022-12-06 13:15:52 +0000
commit7d08150910974c6bd2c29f887c2c6d4a3526e085 (patch)
treebf31ac3f64f7c78d7144f5dfdfcb480b5381deff
parent71801cf3a9ee5cda62d830c46290ec77722eecb8 (diff)
downloadlibqmi-7d08150910974c6bd2c29f887c2c6d4a3526e085.tar.gz
build: if QRTR enabled the pkg-config should publicly require libqrtr-glib
When the QRTR support is enabled the qmi-glib.pc file should include 'qrtr-glib' as a public requirement instead of a private one, so that projects building against libqmi can also detect where the libqrtr-glib headers are available (given that 'qmi-device.h' includes 'libqrtr-glib.h'). Before the change the dependencies in the pkg-config looked like this: Requires: glib-2.0 >= 2.56, gobject-2.0, gio-2.0 Requires.private: qrtr-glib >= 1.0.0, gio-unix-2.0, mbim-glib >= 1.18.0 And now they look like this: Requires: glib-2.0 >= 2.56, gobject-2.0, gio-2.0, qrtr-glib >= 1.0.0 Requires.private: gio-unix-2.0, mbim-glib >= 1.18.0 Fixes https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/issues/99
-rw-r--r--src/libqmi-glib/meson.build7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libqmi-glib/meson.build b/src/libqmi-glib/meson.build
index 0102e2e6..84c8e636 100644
--- a/src/libqmi-glib/meson.build
+++ b/src/libqmi-glib/meson.build
@@ -128,6 +128,11 @@ libqmi_glib_dep = declare_dependency(
link_with: libqmi_glib,
)
+libqmi_glib_pkg_requires = ['glib-2.0', 'gobject-2.0', 'gio-2.0']
+if enable_qrtr
+ libqmi_glib_pkg_requires += [ 'qrtr-glib' ]
+endif
+
pkg.generate(
libraries: libqmi_glib,
version: qmi_version,
@@ -135,7 +140,7 @@ pkg.generate(
description: 'Library to communicate with QMI-powered modems',
subdirs: qmi_glib_include_subdir,
# FIXME: produced by the inhability of meson to use internal dependencies
- requires: ['glib-2.0', 'gobject-2.0', 'gio-2.0'],
+ requires: libqmi_glib_pkg_requires,
variables: [
'exec_prefix=${prefix}',
'qmi_mbim_qmux_supported=' + enable_mbim_qmux.to_int().to_string(),