[gtk-doc/win-no-msys: 4/8] tests/gobject/src: Export symbols for MSVC-style builds



commit 8215a36f1f9ce7b94ffa273816041631402f2076
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Tue Apr 14 12:11:14 2020 +0800

    tests/gobject/src: Export symbols for MSVC-style builds
    
    Define the decoration macros in the previous commit to __declspec(dllexport) so
    that we can export the test APIs when we build the DLL on Visual Studio-style
    builds.
    
    This includes builds done with clang-cl, in addition to MSVC builds, since
    this will be needed for clang-cl builds.

 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..4185974 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 += '-DGTK_DOC_TEST_API=__declspec(dllexport)' # export symbols
 endif
 
 gobject_test_lib = shared_library(


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