summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-06-05 18:31:08 +0000
committerMatthias Clasen <mclasen@redhat.com>2020-06-05 18:31:08 +0000
commit34841c3a5fe2ba5dcbc7a54ab33afd89572b5d38 (patch)
tree34f953a71befe794c1ffaa99f8fb72a42c97fe5e /meson.build
parent185f0181acdd88522eae9632f5d468c4a89eb5f1 (diff)
parentc370b8f30957fd3a41a8da10974e4c8a294fa963 (diff)
downloadgtk+-34841c3a5fe2ba5dcbc7a54ab33afd89572b5d38.tar.gz
Merge branch 'master.msvc' into 'master'
Fix latest GTK master on Visual Studio See merge request GNOME/gtk!2028
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build16
1 files changed, 10 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index a8a3c7cdbe..8eab52925a 100644
--- a/meson.build
+++ b/meson.build
@@ -286,15 +286,19 @@ endif
common_cflags = cc.get_supported_arguments(test_cflags)
# Symbol visibility
+
+if os_win32
+ visibility_define = '__declspec(dllexport) extern'
+else
+ visibility_define = '__attribute__((visibility("default"))) extern'
+endif
+
if get_option('default_library') != 'static'
+ cdata.set('_GDK_EXTERN', visibility_define)
if os_win32
cdata.set('DLL_EXPORT', true)
- cdata.set('_GDK_EXTERN', '__declspec(dllexport) extern')
- if cc.get_id() != 'msvc'
- common_cflags += ['-fvisibility=hidden']
- endif
- else
- cdata.set('_GDK_EXTERN', '__attribute__((visibility("default"))) extern')
+ endif
+ if cc.get_id() != 'msvc'
common_cflags += ['-fvisibility=hidden']
endif
endif