[libgweather/pgriffis/libsoup-ci: 1/4] build: Include libsoup api version in pkg-config
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather/pgriffis/libsoup-ci: 1/4] build: Include libsoup api version in pkg-config
- Date: Tue, 5 Oct 2021 21:37:51 +0000 (UTC)
commit 84811d3bf91b4899365d6d5b606a6bb51c1d1f33
Author: Patrick Griffis <pgriffis igalia com>
Date: Tue Sep 21 11:45:42 2021 -0500
build: Include libsoup api version in pkg-config
meson.build | 13 +++++++++++++
1 file changed, 13 insertions(+)
---
diff --git a/meson.build b/meson.build
index d3dc3954..95e69a1d 100644
--- a/meson.build
+++ b/meson.build
@@ -48,9 +48,11 @@ libxml_req_version = '>= 2.6.0'
if get_option('soup2')
libsoup_name = 'libsoup-2.4'
libsoup_req_version = '>= 2.44.0'
+ libsoup_api_version = '2.4'
else
libsoup_name = 'libsoup-3.0'
libsoup_req_version = '>= 2.99.2'
+ libsoup_api_version = '3.0'
endif
c_compiler = meson.get_compiler('c')
@@ -62,6 +64,14 @@ geocode_glib_dep = dependency('geocode-glib-1.0')
math_dep = c_compiler.find_library('m', required : false)
deps_libgweather = [math_dep, gtk_dep, glib_dep, libsoup_dep, libxml_dep, geocode_glib_dep]
+geocode_soup_version = geocode_glib_dep.get_pkgconfig_variable('soupapiversion')
+if geocode_soup_version == ''
+ geocode_soup_version = '2.4' # Pre libsoup3 support
+endif
+if geocode_soup_version != libsoup_api_version
+ error('geocode-glib was built against a different API of libsoup. @0@ instead of
@1@.'.format(geocode_soup_version, libsoup_api_version))
+endif
+
pylint = find_program('pylint-3', 'pylint3', 'pylint', required: false)
pylint_flags = ['-d', 'C0111', '-d', 'W0511', '-d', 'F0401', '-d', 'C0326' ]
@@ -139,4 +149,7 @@ pkgconfig.generate(
'libxml-2.0',
'geocode-glib-1.0',
],
+ variables: [
+ 'soupapiversion=' + libsoup_api_version,
+ ]
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]