Merge branch 'wip/3v1n0/gio-gmodule-visibility-dep' into 'main'

gmodule: Define a gmodule include dependency and use it in gio modules

Closes #2982

See merge request GNOME/glib!3386
This commit is contained in:
Marco Trevisan 2023-04-21 13:58:50 +00:00
commit 9308f2c353
4 changed files with 26 additions and 11 deletions

View File

@ -8,9 +8,14 @@ inotify_sources = [
]
inotify_lib = static_library('inotify',
sources : [inotify_sources, gmodule_visibility_h],
include_directories : [configinc, glibinc, gmoduleinc],
dependencies : [gioenumtypes_dep, libglib_dep, libgobject_dep],
sources : [inotify_sources],
include_directories : [configinc, glibinc],
dependencies : [
gioenumtypes_dep,
libglib_dep,
libgobject_dep,
gmodule_inc_dep,
],
gnu_symbol_visibility : 'hidden',
pic : true,
c_args : [gio_c_args, gio_c_args_internal])

View File

@ -6,9 +6,12 @@ kqueue_sources = [
]
kqueue_lib = static_library('kqueue',
sources : kqueue_sources,
include_directories : [configinc, glibinc, gmoduleinc],
dependencies : [gioenumtypes_dep],
sources : [kqueue_sources],
include_directories : [configinc, glibinc],
dependencies : [
gioenumtypes_dep,
gmodule_inc_dep,
],
gnu_symbol_visibility : 'hidden',
pic : true,
c_args : [gio_c_args, gio_c_args_internal])

View File

@ -9,8 +9,12 @@ giowin32_sources = [
giowin32_lib = static_library('giowin32',
sources : [giowin32_sources],
include_directories : [configinc, glibinc, gioinc, gmoduleinc],
dependencies : [libintl, gioenumtypes_dep],
include_directories : [configinc, glibinc, gioinc],
dependencies : [
libintl,
gioenumtypes_dep,
gmodule_inc_dep,
],
gnu_symbol_visibility : 'hidden',
pic : true,
c_args : [gio_c_args, gio_c_args_internal])

View File

@ -137,10 +137,13 @@ pkg.generate(libraries : [libgmodule],
description : 'Dynamic module loader for GLib',
)
gmodule_inc_dep = declare_dependency(
include_directories: [gmoduleinc],
sources: [gmodule_visibility_h],
)
libgmodule_dep = declare_dependency(link_with : libgmodule,
include_directories : [gmoduleinc],
sources : [gmodule_visibility_h],
dependencies : [libglib_dep])
dependencies : [libglib_dep, gmodule_inc_dep])
meson.override_dependency('gmodule-no-export-2.0', libgmodule_dep)
meson.override_dependency('gmodule-export-2.0', libgmodule_dep)