[glib-networking] Meson: Build static modules when default_library is 'static' or 'both'



commit 4f3f1f157809c132fe73f8bbaa18f6fa7f52324f
Author: Xavier Claessens <xavier claessens collabora com>
Date:   Thu Jun 23 10:38:46 2022 -0400

    Meson: Build static modules when default_library is 'static' or 'both'
    
    This makes it closer to the behaviour we would have if using library()
    instead of shared_module(). Ideally Meson should allow us to do just
    that, see https://github.com/mesonbuild/meson/pull/3361.
    
    When we can depend on Meson >= 0.60 we should mark 'static_modules'
    option deprecated.

 proxy/environment/meson.build | 2 +-
 proxy/gnome/meson.build       | 2 +-
 proxy/libproxy/meson.build    | 2 +-
 tls/gnutls/meson.build        | 2 +-
 tls/openssl/meson.build       | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/proxy/environment/meson.build b/proxy/environment/meson.build
index 5fc88f8c..9cc18071 100644
--- a/proxy/environment/meson.build
+++ b/proxy/environment/meson.build
@@ -26,7 +26,7 @@ module = shared_module(
   install_dir: gio_module_dir
 )
 
-if get_option('static_modules')
+if get_option('static_modules') or get_option('default_library') != 'shared'
   gioenvironmentproxy_lib = static_library('gioenvironmentproxy',
     objects: module.extract_all_objects(),
     install: true,
diff --git a/proxy/gnome/meson.build b/proxy/gnome/meson.build
index 9aa1ebb1..fdb51856 100644
--- a/proxy/gnome/meson.build
+++ b/proxy/gnome/meson.build
@@ -23,7 +23,7 @@ module = shared_module(
   install_dir: gio_module_dir
 )
 
-if get_option('static_modules')
+if get_option('static_modules') or get_option('default_library') != 'shared'
   giognomeproxy_lib = static_library('giognomeproxy',
     objects: module.extract_all_objects(),
     install: true,
diff --git a/proxy/libproxy/meson.build b/proxy/libproxy/meson.build
index 4db3d486..0fb77819 100644
--- a/proxy/libproxy/meson.build
+++ b/proxy/libproxy/meson.build
@@ -47,7 +47,7 @@ module = shared_module(
   install_dir: gio_module_dir
 )
 
-if get_option('static_modules')
+if get_option('static_modules') or get_option('default_library') != 'shared'
   giolibproxy_lib = static_library('giolibproxy',
     objects: module.extract_all_objects(),
     install: true,
diff --git a/tls/gnutls/meson.build b/tls/gnutls/meson.build
index 42085749..4e6c8965 100644
--- a/tls/gnutls/meson.build
+++ b/tls/gnutls/meson.build
@@ -32,7 +32,7 @@ module = shared_module(
   install_dir: gio_module_dir,
 )
 
-if get_option('static_modules')
+if get_option('static_modules') or get_option('default_library') != 'shared'
   # link_whole is a workaround for a meson bug
   # https://github.com/mesonbuild/meson/pull/3939
   giognutls_lib = static_library('giognutls',
diff --git a/tls/openssl/meson.build b/tls/openssl/meson.build
index 5d8706aa..40b46f1f 100644
--- a/tls/openssl/meson.build
+++ b/tls/openssl/meson.build
@@ -45,7 +45,7 @@ module = shared_module(
   install_dir: gio_module_dir,
 )
 
-if get_option('static_modules')
+if get_option('static_modules') or get_option('default_library') != 'shared'
   # link_whole is a workaround for a meson bug
   # https://github.com/mesonbuild/meson/pull/3939
   gioopenssl_lib = static_library('gioopenssl',


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