Merge branch 'fix-gio-modules-msvc' into 'master'

gio: Also support modules built with MSVC

See merge request GNOME/glib!686
This commit is contained in:
Sebastian Dröge 2019-02-20 21:14:46 +00:00
commit ffe5cdab5c
3 changed files with 5 additions and 4 deletions

View File

@ -51,7 +51,8 @@ _g_io_module_extract_name (const char *filename)
if (g_str_has_prefix (bname, "libgio")) if (g_str_has_prefix (bname, "libgio"))
prefix_len = 6; prefix_len = 6;
else if (g_str_has_prefix (bname, "lib")) /* DLLs built with MSVC generally do not have the 'lib' prefix */
else if (g_str_has_prefix (bname, "lib") || g_str_has_prefix (bname, "gio"))
prefix_len = 3; prefix_len = 3;
else else
prefix_len = 0; /* use whole name (minus suffix) as plugin name */ prefix_len = 0; /* use whole name (minus suffix) as plugin name */

View File

@ -754,7 +754,7 @@ gioenumtypes_c = custom_target('gioenumtypes_c',
'--template', files('gioenumtypes.c.template'), '--template', files('gioenumtypes.c.template'),
'@INPUT@', gnetworking_h]) '@INPUT@', gnetworking_h])
gioenumtypes_dep = declare_dependency(sources : [gioenumtypes_h]) gioenumtypes_dep = declare_dependency(sources : [gioenumtypes_h, gobjectenumtypes_h])
# inotify # inotify
if glib_conf.has('HAVE_SYS_INOTIFY_H') and have_func_inotify_init1 if glib_conf.has('HAVE_SYS_INOTIFY_H') and have_func_inotify_init1

View File

@ -8,8 +8,8 @@ giowin32_sources = [
] ]
giowin32_lib = static_library('giowin32', giowin32_lib = static_library('giowin32',
sources : [giowin32_sources, gioenumtypes_h], sources : [giowin32_sources],
include_directories : [configinc, glibinc, gioinc, gmoduleinc], include_directories : [configinc, glibinc, gioinc, gmoduleinc],
dependencies : [libintl], dependencies : [libintl, gioenumtypes_dep],
pic : true, pic : true,
c_args : [ '-DG_DISABLE_DEPRECATED' ] + gio_c_args) c_args : [ '-DG_DISABLE_DEPRECATED' ] + gio_c_args)