meson: Cleanup include-dir paths, use base path without repetitions

Avoid setting the subdir all the times, just use the global definition
plus the specific module subdir
This commit is contained in:
Marco Trevisan (Treviño)
2022-10-24 14:13:04 +02:00
parent 7e5c5932fc
commit e02e1ed07a
5 changed files with 20 additions and 11 deletions

View File

@@ -6,6 +6,8 @@ g_module_have_dlerror = 0
g_module_impl = ''
g_module_includedir = glib_includedir / 'gmodule'
# On Windows force native WIN32 shared lib loader
if host_system == 'windows'
g_module_impl = 'G_MODULE_IMPL_WIN32'
@@ -64,13 +66,13 @@ gmoduleconf_h = configure_file(input : 'gmoduleconf.h.in',
gmodule_h = files('gmodule.h')
gmodule_c = files('gmodule.c')
install_headers([gmodule_h], subdir : 'glib-2.0')
install_headers([gmodule_h], install_dir : glib_includedir)
gvisibility_h = configure_file(
output: 'gmodule-visibility.h',
command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GMODULE', '@OUTPUT@'],
)
install_headers(gvisibility_h, subdir : 'glib-2.0/gmodule')
install_headers(gvisibility_h, install_dir : g_module_includedir)
gmodule_sources = [gmodule_c]
if host_system == 'windows'