meson.build 898 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
if not get_option('fam')
  subdir_done()
endif

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
10

11 12 13 14 15 16
deps = [
  fam_dep,
  libglib_dep,
  libgobject_dep,
  libgio_dep,
]
17

18 19 20 21 22
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',
])
23

24 25 26 27 28 29 30 31 32
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,
)
33

34 35
if not meson.is_cross_build()
  meson.add_install_script('../gio-querymodules-wrapper.py', gio_querymodules.full_path(), glib_giomodulesdir)
36
endif