diff options
author | Patrick Griffis <pgriffis@igalia.com> | 2021-09-21 11:45:42 -0500 |
---|---|---|
committer | Patrick Griffis <pgriffis@igalia.com> | 2021-10-15 13:48:34 -0500 |
commit | 04b16535a902d6cd6f606e62b79bb175447cb03c (patch) | |
tree | 8cd5d72bab33c9a128121db8db1aa7ad405da7f0 | |
parent | 044c8392e9d1c8a0ae2d3177d8f191eae4def400 (diff) | |
download | libgweather-04b16535a902d6cd6f606e62b79bb175447cb03c.tar.gz |
build: Include libsoup api version in pkg-config
-rw-r--r-- | libgweather/meson.build | 3 | ||||
-rw-r--r-- | meson.build | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/libgweather/meson.build b/libgweather/meson.build index 2fd6f3b..1868457 100644 --- a/libgweather/meson.build +++ b/libgweather/meson.build @@ -241,6 +241,9 @@ pkgconfig.generate( 'libxml-2.0', 'geocode-glib-1.0', ], + variables: [ + 'soupapiversion=' + libsoup_api_version, + ] ) subdir('tests') diff --git a/meson.build b/meson.build index c27dd60..62f1e76 100644 --- a/meson.build +++ b/meson.build @@ -41,9 +41,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') @@ -55,6 +57,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', |