summaryrefslogtreecommitdiff
path: root/client/meson.build
blob: bfb8278d53338c2f9094e3e90b82598fa4d09f0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
headers = files(
  'gvfsurimapper.h',
  'gvfsuriutils.h',
)

install_headers(
  headers,
  subdir: 'gvfs-client/gvfs',
)

# Dynamic client lib
uri_parser_sources = files(
  'afpuri.c',
  'httpuri.c',
  'smburi.c',
)

uri_utils = files('gvfsuriutils.c')

sources = uri_parser_sources + uri_utils + files(
  'gdaemonmount.c',
  'gdaemonfile.c',
  'gdaemonfileenumerator.c',
  'gdaemonfileinputstream.c',
  'gdaemonfilemonitor.c',
  'gdaemonfileoutputstream.c',
  'gdaemonvfs.c',
  'gdaemonvolumemonitor.c',
  'gvfsdaemondbus.c',
  'gvfsiconloadable.c',
  'gvfsurimapper.c',
)

deps = [
  gio_unix_dep,
  libmetadata_dep,
]

cflags = [
  '-DG_LOG_DOMAIN="@0@"'.format(gvfs_name.to_upper()),
  '-DGVFS_LOCALEDIR="@0@"'.format(gvfs_prefix / gvfs_localedir),
  '-DGVFS_MODULE_DIR="@0@"'.format(gvfs_prefix / gvfs_pkglibdir / 'modules'),
]

symbol_map = meson.current_source_dir() / 'symbol.map'

ldflags = []
if have_version_script
  ldflags += '@0@,@1@'.format(version_script_ldflag, symbol_map)
endif

libgvfsdbus = shared_module(
  'gvfsdbus',
  sources: sources,
  include_directories: top_inc,
  dependencies: deps,
  c_args: cflags,
  link_args: ldflags,
  link_depends: symbol_map,
  install: true,
  install_rpath: gvfs_rpath,
  install_dir: gio_giomoduledir,
)

if enable_devel_utils
  test_name = 'test-uri-utils'

  executable(
    test_name,
    [test_name + '.c'] + uri_utils,
    include_directories: top_inc,
    dependencies: libgvfscommon_dep,
    c_args: cflags,
  )
endif

# FUSE daemon
if enable_fuse
  if install_systemd_tmpfilesdir
    install_data(
      'gvfsd-fuse-tmpfiles.conf',
      install_dir: systemd_tmpfilesdir,
    )
  endif

  deps = [
    fuse_dep,
    libgvfscommon_dep,
  ]

  executable(
    'gvfsd-fuse',
    'gvfsfusedaemon.c',
    include_directories: top_inc,
    dependencies: deps,
    c_args: cflags + ['-UG_LOG_DOMAIN'],
    install: true,
    install_rpath: gvfs_rpath,
    install_dir: gvfs_libexecdir,
  )
endif