[glib-networking] meson: Export static libraries and deps
- From: Xavier Claessens <xclaesse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking] meson: Export static libraries and deps
- Date: Thu, 23 Jun 2022 14:35:22 +0000 (UTC)
commit 2228cfb9c9794611f23f25e58448d4da25fe38a1
Author: Olivier CrĂȘte <olivier crete collabora com>
Date: Thu Jun 16 18:07:06 2022 -0400
meson: Export static libraries and deps
This way it can be used as a subproject
Part-of: <https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/213>
meson.build | 2 +-
proxy/environment/meson.build | 7 ++++++-
proxy/gnome/meson.build | 5 ++++-
proxy/libproxy/meson.build | 5 ++++-
tls/gnutls/meson.build | 5 ++++-
tls/openssl/meson.build | 5 ++++-
6 files changed, 23 insertions(+), 6 deletions(-)
---
diff --git a/meson.build b/meson.build
index 754e1636..bacc545e 100644
--- a/meson.build
+++ b/meson.build
@@ -2,7 +2,7 @@ project(
'glib-networking', 'c',
version: '2.72.0',
license: 'LGPL2.1+',
- meson_version: '>= 0.50.0',
+ meson_version: '>= 0.54.0',
default_options: ['c_std=gnu99']
)
diff --git a/proxy/environment/meson.build b/proxy/environment/meson.build
index 5cbd5bcf..5fc88f8c 100644
--- a/proxy/environment/meson.build
+++ b/proxy/environment/meson.build
@@ -27,12 +27,17 @@ module = shared_module(
)
if get_option('static_modules')
- static_library('gioenvironmentproxy',
+ gioenvironmentproxy_lib = static_library('gioenvironmentproxy',
objects: module.extract_all_objects(),
install: true,
install_dir: gio_module_dir
)
pkg.generate(module)
+
+ gioenvironmentproxy_dep = declare_dependency(
+ link_with: gioenvironmentproxy_lib
+ )
+ meson.override_dependency('gioenvironmentproxy', gioenvironmentproxy_dep)
endif
proxy_test_programs += [['environment', 'environment', deps]]
diff --git a/proxy/gnome/meson.build b/proxy/gnome/meson.build
index 17521cbb..9aa1ebb1 100644
--- a/proxy/gnome/meson.build
+++ b/proxy/gnome/meson.build
@@ -24,12 +24,15 @@ module = shared_module(
)
if get_option('static_modules')
- static_library('giognomeproxy',
+ giognomeproxy_lib = static_library('giognomeproxy',
objects: module.extract_all_objects(),
install: true,
install_dir: gio_module_dir
)
pkg.generate(module)
+
+ giognomeproxy_dep = declare_dependency(link_with: giognomeproxy_lib)
+ meson.override_dependency('giognomeproxy', giognomeproxy_dep)
endif
proxy_test_programs += [['gnome', 'gnome', deps]]
diff --git a/proxy/libproxy/meson.build b/proxy/libproxy/meson.build
index 28fbc840..4db3d486 100644
--- a/proxy/libproxy/meson.build
+++ b/proxy/libproxy/meson.build
@@ -48,12 +48,15 @@ module = shared_module(
)
if get_option('static_modules')
- static_library('giolibproxy',
+ giolibproxy_lib = static_library('giolibproxy',
objects: module.extract_all_objects(),
install: true,
install_dir: gio_module_dir
)
pkg.generate(module)
+
+ giolibproxy_dep = declare_dependency(link_with: giolibproxy_lib)
+ meson.override_dependency('giolibproxy', giolibproxy_dep)
endif
sources = files(
diff --git a/tls/gnutls/meson.build b/tls/gnutls/meson.build
index 0abf889e..42085749 100644
--- a/tls/gnutls/meson.build
+++ b/tls/gnutls/meson.build
@@ -35,13 +35,16 @@ module = shared_module(
if get_option('static_modules')
# link_whole is a workaround for a meson bug
# https://github.com/mesonbuild/meson/pull/3939
- static_library('giognutls',
+ giognutls_lib = static_library('giognutls',
objects: module.extract_all_objects(),
install: true,
install_dir: gio_module_dir,
link_whole: [tlsbase]
)
pkg.generate(module)
+
+ giognutls_dep = declare_dependency(link_with: giognutls_lib)
+ meson.override_dependency('giognutls', giognutls_dep)
endif
if meson.version().version_compare('>=0.58')
diff --git a/tls/openssl/meson.build b/tls/openssl/meson.build
index b24bed82..5d8706aa 100644
--- a/tls/openssl/meson.build
+++ b/tls/openssl/meson.build
@@ -48,13 +48,16 @@ module = shared_module(
if get_option('static_modules')
# link_whole is a workaround for a meson bug
# https://github.com/mesonbuild/meson/pull/3939
- static_library('gioopenssl',
+ gioopenssl_lib = static_library('gioopenssl',
objects: module.extract_all_objects(),
install: true,
install_dir: gio_module_dir,
link_whole: [tlsbase]
)
pkg.generate(module)
+
+ gioopenssl_dep = declare_dependency(link_with: gioopenssl_lib)
+ meson.override_dependency('gioopenssl', gioopenssl_dep)
endif
if meson.version().version_compare('>=0.58')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]