summaryrefslogtreecommitdiff
path: root/src/tracker/meson.build
blob: 3f64f0180de130fe2965c511d9db1512888803e5 (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
modules = [
    'endpoint',
    'export',
    'help',
    'import',
    'shell',
    'sparql',
    'sql',
]

sources = [
    'tracker-main.c',
]

foreach m: modules
    sources += 'tracker-@0@.c'.format(m)
endforeach

command_name = 'tracker@0@'.format(tracker_api_major)
subcommands_dir = join_paths(get_option('prefix'), get_option('libexecdir'), tracker_versioned_name)

executable(command_name, sources,
    c_args: tracker_c_args + [
        '-DCOMMANDNAME="@0@"'.format(command_name),
        '-DSUBCOMMANDSDIR="@0@"'.format(subcommands_dir),
        '-DMANDIR="@0@"'.format(join_paths(get_option('prefix'), get_option('datadir'), 'man')),
        '-DBINDIR="@0@"'.format(join_paths(get_option('prefix'), get_option('bindir'))),
    ],
    install: true,
    install_rpath: tracker_internal_libs_dir,
    dependencies: [tracker_common_dep, tracker_sparql_dep, tracker_sparql_private_dep, gio_unix],
    include_directories: [commoninc, configinc, srcinc],
)

meson.add_install_script('make-subcommand-links.sh',
    [ '@0@'.format(join_paths(get_option('prefix'), get_option('bindir'), command_name)),
      '@0@'.format(subcommands_dir),
    ] + modules)

if get_option('bash_completion')
    install_data(
        sources: 'bash-completion/tracker',
        install_dir: bash_completion_dir,
	rename: command_name)
endif

run_command('make-uninstalled-subcommand-links.sh', modules,
            check: true)