summaryrefslogtreecommitdiff
path: root/src/libtracker-miner/meson.build
blob: 545867771b07f343af60239e9d822e1461c934a5 (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
102
103
104
105
shared_libtracker_miner_monitor_sources = files('tracker-monitor.c')
shared_libtracker_miner_file_system_sources = files('tracker-file-system.c')
shared_libtracker_miner_crawler_sources = files('tracker-crawler.c')

miner_enums = gnome.mkenums('tracker-miner-enum-types',
    sources: 'tracker-miner-enums.h',
    c_template: 'tracker-miner-enum-types.c.template',
    h_template: 'tracker-miner-enum-types.h.template',
)

private_sources = [
    'tracker-crawler.c',
    'tracker-file-data-provider.c',
    'tracker-file-enumerator.c',
    'tracker-file-notifier.c',
    'tracker-file-system.c',
    'tracker-priority-queue.c',
    'tracker-task-pool.c',
    'tracker-sparql-buffer.c',
    'tracker-utils.c']

miner_headers = [
    'tracker-enumerator.h',
    'tracker-miner-online.h',
    'tracker-data-provider.h',
    'tracker-indexing-tree.h',
    'tracker-decorator-fs.h',
    'tracker-miner-fs.h',
    'tracker-miner-object.h',
    'tracker-decorator.h',
    'tracker-miner-enums.h',
    'tracker-miner.h',
]

miner_sources = (
    shared_libtracker_miner_monitor_sources +
    shared_libtracker_miner_file_system_sources +
    shared_libtracker_miner_crawler_sources +
    ['tracker-data-provider.c',
    'tracker-decorator.c',
    'tracker-decorator-fs.c',
    'tracker-enumerator.c',
    'tracker-indexing-tree.c',
    'tracker-miner-object.c',
    'tracker-miner-online.c',
    'tracker-miner-fs.c'])

libtracker_miner_private = static_library(
    'tracker-miner-private',
    miner_enums[0], miner_enums[1], private_sources,
    dependencies: [tracker_common_dep, tracker_sparql_dep],
    c_args: tracker_c_args,
)

tracker_miner_dependencies = []
if network_manager.found()
    tracker_miner_dependencies += network_manager
endif

libtracker_miner = library(
    'tracker-miner-' + tracker_api_version,
    miner_enums[0], miner_enums[1], miner_sources,
    c_args: tracker_c_args,
    install: true,
    install_rpath: tracker_internal_libs_dir,
    # This doesn't depend on tracker_common_dep because of
    # https://github.com/mesonbuild/meson/issues/671
    include_directories: [commoninc, configinc, srcinc],
    dependencies: [tracker_sparql_dep] + tracker_miner_dependencies,
    link_with: [libtracker_miner_private],
)

tracker_miner_dep = declare_dependency(
    sources: miner_enums[1],
    link_with: libtracker_miner,
    include_directories: include_directories('.')
)

tracker_miner_gir = gnome.generate_gir(libtracker_miner,
    sources: miner_sources + miner_headers,
    nsversion: tracker_api_version,
    namespace: 'TrackerMiner',
    identifier_prefix: 'Tracker',
    symbol_prefix: 'tracker',
    # FIXME: also depends on Tracker-1.0.gir (output of libtracker-sparql)
    # but we can't currently access that from the Vala target
    includes : ['GLib-2.0', 'GObject-2.0', 'Gio-2.0' ],
    install: true,
    extra_args: tracker_c_args + [
        '--c-include=libtracker-miner/tracker-miner.h',
    ])

configure_file(
    input: 'tracker-miner.pc.in',
    output: 'tracker-miner-1.0.pc',
    configuration: conf,
    install: true,
    install_dir: join_paths(get_option('prefix'), get_option('libdir'), 'pkgconfig'))

install_headers(miner_headers, subdir: 'tracker-1.0/libtracker-miner')

# Work around https://github.com/mesonbuild/meson/issues/705
meson.add_install_script('../install-generated-header.sh',
    join_paths(meson.current_build_dir(), 'tracker-miner-enum-types.h'),
    join_paths(get_option('prefix'), get_option('includedir'), 'tracker-1.0', 'libtracker-miner'))