[gobject-introspection] meson: only link against libpython on Windows



commit a6f2c00c0c414a850ddac3a06189e9e7858bb882
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Mon Dec 17 20:26:25 2018 +0100

    meson: only link against libpython on Windows
    
    Like we currently do with autotools.
    See https://github.com/mesonbuild/meson/issues/4117

 giscanner/meson.build | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/giscanner/meson.build b/giscanner/meson.build
index e9f75e73..6ac74aaf 100644
--- a/giscanner/meson.build
+++ b/giscanner/meson.build
@@ -81,12 +81,19 @@ giscanner_lib = static_library('giscanner',
   dependencies: [glib_dep, gobject_dep, gio_dep, gmodule_dep],
 )
 
+# https://github.com/mesonbuild/meson/issues/4117
+if host_machine.system() == 'windows'
+  python_ext_dep = python.dependency()
+else
+  python_ext_dep = python.dependency().partial_dependency(compile_args: true)
+endif
+
 giscanner_pymod = python.extension_module('_giscanner', ['giscannermodule.c'],
   link_with: giscanner_lib,
   c_args: [gi_hidden_visibility_cflags],
   include_directories : configinc,
   dependencies: [glib_dep, gobject_dep, gio_dep, gmodule_dep,
-                 python.dependency()],
+                 python_ext_dep],
   install: true,
   install_dir: giscannerdir,
 )


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