Commit 077e9f04 authored by Xavier Claessens's avatar Xavier Claessens

Meson: Build fam module

gio-querymodules-wrapper.py is copied from glib-networking. This python
wrapper script is needed because meson.build cannot check for DESTDIR
env variable itself, unlike Makefile.am. It is used to update
giomodule.cache file when installing GIO modules like fam.
parent b087b264
......@@ -820,6 +820,7 @@ gio-2.0.lib: libgio-2.0.la gio.def
$(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
bin_PROGRAMS = gio-querymodules glib-compile-schemas glib-compile-resources gsettings
EXTRA_DIST += gio-querymodules-wrapper.py
glib_compile_resources_LDADD = libgio-2.0.la \
$(top_builddir)/gobject/libgobject-2.0.la \
......
{
global:
g_io_module_load;
g_io_module_unload;
g_io_module_query;
local:
*;
};
# FIXME: We should use subdir_done() instead of if blocks, but it's broken in
# meson 0.46.1. See https://github.com/mesonbuild/meson/issues/3700.
if get_option('fam')
fam_dep = cc.find_library('fam')
fam_c_args = ['-DG_DISABLE_DEPRECATED'] + gio_c_args
if cc.has_function('FAMNoExists', dependencies : fam_dep)
fam_c_args += '-DHAVE_FAM_NO_EXISTS=1'
endif
deps = [
fam_dep,
libglib_dep,
libgobject_dep,
libgio_dep,
]
symbol_map = join_paths(meson.current_source_dir(), 'gfamfilemonitor.map')
fam_ldflags = cc.get_supported_link_arguments([
'-Wl,--version-script,' + symbol_map,
'-Wl,-no-undefined',
])
module = shared_module('giofam', 'gfamfilemonitor.c',
include_directories : [gmoduleinc],
dependencies : deps,
c_args : fam_c_args,
link_args : fam_ldflags,
link_depends : symbol_map,
install_dir : glib_giomodulesdir,
install : true,
)
if not meson.is_cross_build()
meson.add_install_script('../gio-querymodules-wrapper.py', gio_querymodules.full_path(), glib_giomodulesdir)
endif
endif
#!/usr/bin/env python3
import os
import subprocess
import sys
if not os.environ.get('DESTDIR'):
print('GIO module cache creation...')
subprocess.call([sys.argv[1], sys.argv[2]])
......@@ -759,11 +759,6 @@ if host_system == 'windows'
internal_deps += [ giowin32_lib ]
endif
# FIXME: FAM support
#if HAVE_FAM
# subdir('fam')
#endif
if have_bash
install_data([
'completion/gapplication',
......@@ -900,7 +895,7 @@ executable('gresource', 'gresource-tool.c',
link_args : noseh_link_args,
dependencies : [libelf, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c',
gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c',
install : true,
c_args : gio_c_args,
# intl.lib is not compatible with SAFESEH
......@@ -958,6 +953,8 @@ if enable_systemtap
install : true)
endif
subdir('fam')
if host_system != 'windows'
subdir('tests')
endif
......@@ -73,3 +73,8 @@ option('force_posix_threads',
type : 'boolean',
value : false,
description : 'Also use posix threads in case the platform defaults to another implementation (on Windows for example)')
option('fam',
type : 'boolean',
value : false,
description : 'Use fam for file system monitoring')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment