[glib-networking/wip/nacho/openssl: 7/14] Fix for symbol visibility with msvc
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/wip/nacho/openssl: 7/14] Fix for symbol visibility with msvc
- Date: Wed, 19 Sep 2018 15:34:54 +0000 (UTC)
commit 1ddad330dd67c3a7ce50017eb75e13a206cde3f4
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date: Mon Sep 10 17:23:12 2018 +0200
Fix for symbol visibility with msvc
meson.build | 6 ++++++
tls/gnutls/meson.build | 3 ++-
tls/openssl/meson.build | 3 ++-
3 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index a551a64..b6cf220 100644
--- a/meson.build
+++ b/meson.build
@@ -42,6 +42,12 @@ if host_system.contains('linux')
module_ldflags += cc.get_supported_link_arguments(test_ldflag)
endif
+extra_args= []
+# Detect and set symbol visibility
+if cc.get_id() == 'msvc'
+ extra_args += ['-D_GLIB_EXTERN=__declspec (dllexport) extern']
+endif
+
# *** Check GLib GIO ***
glib_dep = dependency('glib-2.0', version: '>= 2.55.1',
fallback: ['glib', 'libglib_dep'])
diff --git a/tls/gnutls/meson.build b/tls/gnutls/meson.build
index 55280c9..dcfd8c9 100644
--- a/tls/gnutls/meson.build
+++ b/tls/gnutls/meson.build
@@ -42,7 +42,8 @@ module = shared_module(
link_depends: symbol_map,
name_suffix: module_suffix,
install: true,
- install_dir: gio_module_dir
+ install_dir: gio_module_dir,
+ c_args: extra_args
)
if get_option('static_modules')
diff --git a/tls/openssl/meson.build b/tls/openssl/meson.build
index 5bec3b1..6684007 100644
--- a/tls/openssl/meson.build
+++ b/tls/openssl/meson.build
@@ -31,7 +31,8 @@ module = shared_module(
link_depends: symbol_map,
name_suffix: module_suffix,
install: true,
- install_dir: gio_module_dir
+ install_dir: gio_module_dir,
+ c_args: extra_args
)
if get_option('static_modules')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]