summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2017-03-30 23:55:04 +0100
committerSam Thursfield <sam@afuera.me.uk>2017-03-30 23:57:57 +0100
commit078d332365ae08696b9804679bb4cdf4168d858a (patch)
tree9a049aa6ca7dd6a7d9bc34a2f1c7e478918f34ce
parent68acaacab1eac22cc0e8913911987c76fda7665e (diff)
downloadtracker-wip/sam/meson.tar.gz
meson: Install Tracker-1.0 GIR and Typelibwip/sam/meson
This is done in a horrendously hacky way for the time being. We really need accessor functions for target outputs to do it more cleanly, so we could call .vala_gir() on the libtracker_sparql target object and get the actual GIR output. See https://github.com/mesonbuild/meson/issues/891
-rw-r--r--src/libtracker-sparql/meson.build16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/libtracker-sparql/meson.build b/src/libtracker-sparql/meson.build
index 61bb64b9f..9c6c4a718 100644
--- a/src/libtracker-sparql/meson.build
+++ b/src/libtracker-sparql/meson.build
@@ -28,7 +28,7 @@ libtracker_sparql_intermediate = static_library('tracker-sparql',
# build system as well.
# FIXME: we also can't depend on this in the TrackerMiner GIR, which
# probably breaks stuff
- vala_gir: '../Tracker-' + tracker_api_version + '.gir',
+ vala_gir: 'Tracker-' + tracker_api_version + '.gir',
vala_args: [
'--debug',
'--includedir', 'libtracker-sparql',
@@ -87,6 +87,20 @@ meson.add_install_script('../install-generated-header.sh',
join_paths(meson.current_build_dir(), 'tracker-generated.h'),
join_paths(get_option('prefix'), get_option('includedir'), 'tracker-1.0', 'libtracker-sparql'))
+custom_target('tracker-sparql-typelib',
+ command: ['g-ir-compiler', '--output', '@OUTPUT@', join_paths(meson.current_build_dir(), 'Tracker-1.0.gir')],
+ #input: join_paths(meson.current_build_dir(), 'Tracker-1.0.gir'),
+ output: 'Tracker-1.0.typelib',
+ depends: libtracker_sparql_intermediate,
+ install: true,
+ install_dir: join_paths(get_option('libdir'), 'girepository-1.0'))
+
+# FIXME: reusing the same script to install the .gir; see
+# <https://github.com/mesonbuild/meson/issues/891>.
+meson.add_install_script('../install-generated-header.sh',
+ join_paths(meson.current_build_dir(), 'Tracker-1.0.gir'),
+ join_paths(get_option('prefix'), get_option('datadir'), 'gir-1.0'))
+
# FIXME: we can't depend properly on the generated .vapi to do this.
custom_target('tracker-sparql-' + tracker_api_version + '.vapi',
#input: 'tracker-sparql-vala.vapi',