[glib-networking] Add 'static-modules' option
- From: Xavier Claessens <xclaesse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking] Add 'static-modules' option
- Date: Thu, 4 Jan 2018 19:09:15 +0000 (UTC)
commit a3e65ab8a9020749002ca2301a3d2c18e4c8e94a
Author: Xavier Claessens <xavier claessens collabora com>
Date: Sat Dec 2 16:13:06 2017 -0500
Add 'static-modules' option
When enabled both a shared module and static library are built for each
module.
https://bugzilla.gnome.org/show_bug.cgi?id=791100
meson_options.txt | 1 +
proxy/gnome/meson.build | 10 +++++++++-
proxy/libproxy/meson.build | 10 +++++++++-
tls/gnutls/meson.build | 10 +++++++++-
tls/pkcs11/meson.build | 3 ++-
5 files changed, 30 insertions(+), 4 deletions(-)
---
diff --git a/meson_options.txt b/meson_options.txt
index df00c5e..462aed7 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,3 +4,4 @@ option('tls_support', type: 'boolean', value: true, description: 'support for TL
option('ca_certificates_path', type: 'string', value: '', description: 'path to system Certificate Authority
list')
option('pkcs11_support', type: 'boolean', value: true, description: 'support for PKCS#11 using p11-kit')
option('installed_tests', type: 'boolean', value: false, description: 'enable installed tests')
+option('static_modules', type: 'boolean', value: false, description: 'build static modules')
diff --git a/proxy/gnome/meson.build b/proxy/gnome/meson.build
index 45f210d..069a459 100644
--- a/proxy/gnome/meson.build
+++ b/proxy/gnome/meson.build
@@ -9,7 +9,7 @@ deps = [
gsettings_desktop_schemas_dep
]
-shared_module(
+module = shared_module(
'giognomeproxy',
sources: sources,
include_directories: top_inc,
@@ -20,4 +20,12 @@ shared_module(
install_dir: gio_module_dir
)
+if get_option('static_modules')
+ static_library('giognomeproxy',
+ objects: module.extract_all_objects(),
+ install: true,
+ install_dir: gio_module_dir
+ )
+endif
+
proxy_test_programs += [['gnome', deps]]
diff --git a/proxy/libproxy/meson.build b/proxy/libproxy/meson.build
index ff91af4..baa7ab7 100644
--- a/proxy/libproxy/meson.build
+++ b/proxy/libproxy/meson.build
@@ -32,7 +32,7 @@ deps = [
libproxy_dep
]
-shared_module(
+module = shared_module(
'giolibproxy',
sources: sources,
include_directories: top_inc,
@@ -44,6 +44,14 @@ shared_module(
install_dir: gio_module_dir
)
+if get_option('static_modules')
+ static_library('giolibproxy',
+ objects: module.extract_all_objects(),
+ install: true,
+ install_dir: gio_module_dir
+ )
+endif
+
sources = files(
'glibproxyresolver.c',
'glibpacrunner.c'
diff --git a/tls/gnutls/meson.build b/tls/gnutls/meson.build
index b189a5d..98bbb73 100644
--- a/tls/gnutls/meson.build
+++ b/tls/gnutls/meson.build
@@ -31,7 +31,7 @@ if enable_pkcs11_support
deps += libgiopkcs11_dep
endif
-shared_module(
+module = shared_module(
'giognutls',
sources: sources,
include_directories: incs,
@@ -41,3 +41,11 @@ shared_module(
install: true,
install_dir: gio_module_dir
)
+
+if get_option('static_modules')
+ static_library('giognutls',
+ objects: module.extract_all_objects(),
+ install: true,
+ install_dir: gio_module_dir
+ )
+endif
diff --git a/tls/pkcs11/meson.build b/tls/pkcs11/meson.build
index 616d7a6..5a9523a 100644
--- a/tls/pkcs11/meson.build
+++ b/tls/pkcs11/meson.build
@@ -14,7 +14,8 @@ libgiopkcs11 = static_library(
'giopkcs11',
sources: sources,
include_directories: top_inc,
- dependencies: deps
+ dependencies: deps,
+ install: get_option('static_modules')
)
libgiopkcs11_dep = declare_dependency(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]