summaryrefslogtreecommitdiff
path: root/gmodule
diff options
context:
space:
mode:
Diffstat (limited to 'gmodule')
-rw-r--r--gmodule/gmodule.h1
-rw-r--r--gmodule/meson.build9
2 files changed, 9 insertions, 1 deletions
diff --git a/gmodule/gmodule.h b/gmodule/gmodule.h
index 974489041..ec14f4e10 100644
--- a/gmodule/gmodule.h
+++ b/gmodule/gmodule.h
@@ -28,6 +28,7 @@
#define __GMODULE_H__
#include <glib.h>
+#include <gmodule/gmodule-visibility.h>
G_BEGIN_DECLS
diff --git a/gmodule/meson.build b/gmodule/meson.build
index 0c5aad311..54b25a0c5 100644
--- a/gmodule/meson.build
+++ b/gmodule/meson.build
@@ -66,6 +66,12 @@ gmodule_c = files('gmodule.c')
install_headers([gmodule_h], subdir : 'glib-2.0')
+gvisibility_h = configure_file(
+ output: 'gmodule-visibility.h',
+ command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GMODULE', '@OUTPUT@'],
+)
+install_headers(gvisibility_h, subdir : 'glib-2.0/gmodule')
+
gmodule_sources = [gmodule_c]
if host_system == 'windows'
gmodule_win_rc = configure_file(
@@ -85,7 +91,8 @@ libgmodule = library('gmodule-2.0',
install : true,
include_directories : [configinc, gmoduleinc],
dependencies : [libdl_dep, libglib_dep],
- c_args : ['-DG_LOG_DOMAIN="GModule"'] + glib_hidden_visibility_args,
+ c_args : ['-DG_LOG_DOMAIN="GModule"', '-DGMODULE_COMPILATION'],
+ gnu_symbol_visibility : 'hidden',
link_args : [glib_link_flags],
)