[libpeas/meson.msvc: 16/19] embedded tests: Force export of generated resource code




commit 58b749f9bfe00bdd63f82db8f45228d9f841a83b
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Nov 20 15:38:41 2019 +0800

    embedded tests: Force export of generated resource code
    
    The 'export' option for glib-compile-resources needs to be updated for
    Visual Studio builds, so that such symbols are really exported.  Before
    this happens in GLib-2.64.4, force export of the symbols we need for the
    tests.

 tests/libpeas/plugins/embedded/meson.build | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/tests/libpeas/plugins/embedded/meson.build b/tests/libpeas/plugins/embedded/meson.build
index c3e1b938..00232bf9 100644
--- a/tests/libpeas/plugins/embedded/meson.build
+++ b/tests/libpeas/plugins/embedded/meson.build
@@ -1,5 +1,11 @@
 libembedded_name = 'embedded'
 
+if cc.get_id() == 'msvc' and glib_dep.version() < '2.64.4'
+  libembedded_link_args = ['-export:embedded_register_resource']
+else
+  libembedded_link_args = []
+endif
+
 libembedded_public_h = [
   'embedded-plugin.h',
 ]
@@ -34,6 +40,7 @@ libembedded_lib = shared_library(
   libembedded_c + libembedded_res,
   include_directories: rootdir,
   dependencies: libembedded_deps,
+  link_args: libembedded_link_args,
   install: false,
 )
 


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