[geocode-glib/pgriffis/soupapiversion] build: Expose libsoup API version in pkg-config This allows projects that depend on geocode-glib to




commit 6047da31cfeb7f9fb33499dcc8db3b6fabc75428
Author: Patrick Griffis <pgriffis igalia com>
Date:   Tue Sep 21 11:08:42 2021 -0500

    build: Expose libsoup API version in pkg-config
    This allows projects that depend on geocode-glib to ensure the
    correct version of libsoup is matched at build time.

 geocode-glib/meson.build | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/geocode-glib/meson.build b/geocode-glib/meson.build
index 940dc7b..970860f 100644
--- a/geocode-glib/meson.build
+++ b/geocode-glib/meson.build
@@ -79,6 +79,12 @@ libgcglib = shared_library('geocode-glib',
 
 install_headers(headers, subdir: header_subdir)
 
+if get_option('soup2')
+  soup_api_version = '2.4'
+else
+  soup_api_version = '3.0'
+endif
+
 pkgconf = import('pkgconfig')
 pkgconf.generate(libraries: libgcglib,
                  version: gclib_version,
@@ -89,6 +95,7 @@ pkgconf.generate(libraries: libgcglib,
                  requires: 'gio-2.0',
                  variables: [
                    'apiversion=' + gclib_api_version,
+                   'soupapiversion=' + soup_api_version,
                  ])
 
 gir = find_program('g-ir-scanner', required: false)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]