[gtk-doc/win-no-msys: 17/22] tests/gobject/src: Export symbols on MSVC-style builds
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc/win-no-msys: 17/22] tests/gobject/src: Export symbols on MSVC-style builds
- Date: Thu, 25 Feb 2021 04:17:00 +0000 (UTC)
commit b803387bd256956a33af666d660473bf07584cfd
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Apr 17 15:22:29 2020 +0800
tests/gobject/src: Export symbols on MSVC-style builds
Override _GTKDOC_TESTER_API with __declspec(dllexport) so that symbols are
exported from the built DLL. This is also needed if we are building with
clang-cl.
tests/gobject/src/meson.build | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/tests/gobject/src/meson.build b/tests/gobject/src/meson.build
index 155f5af..6c46096 100644
--- a/tests/gobject/src/meson.build
+++ b/tests/gobject/src/meson.build
@@ -16,9 +16,12 @@ gobject_test_deps = [
]
extra_cflags = []
-if cc.get_id() == 'msvc'
- extra_cflags += '/FImsvc_recommended_pragmas.h'
- extra_cflags += cc.get_supported_arguments(['/utf-8'])
+if cc.get_argument_syntax() == 'msvc'
+ if cc.get_id() == 'msvc'
+ extra_cflags += '/FImsvc_recommended_pragmas.h'
+ extra_cflags += cc.get_supported_arguments(['/utf-8'])
+ endif
+ extra_cflags += '/D_GTKDOC_TESTER_API=__declspec(dllexport)'
endif
gobject_test_lib = shared_library(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]