diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2023-03-05 12:09:04 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2023-03-05 12:09:04 +0100 |
commit | bc2f71db6277e833943ee34c2d7749fd59f866a4 (patch) | |
tree | 8beb3e43459ca24ff01f1c33ad4d189a636236b0 /src | |
parent | 6d40e91c97c2307d02767a6a5c74c3eaab8ce3d0 (diff) | |
download | tracker-bc2f71db6277e833943ee34c2d7749fd59f866a4.tar.gz |
libtracker-common: Fix building Tracker as a subproject
The module lookup is currently based to the top builddir, which
might differ is Tracker is being built as a subproject. Make
it dependent on the current build dir (i.e. the directory the
module will be built to), so it works also on those situations.
Fixes: a4f9885a15d ("libtracker-common: Convert unicode parser to a GModule")
Diffstat (limited to 'src')
-rw-r--r-- | src/libtracker-common/meson.build | 1 | ||||
-rw-r--r-- | src/libtracker-common/tracker-parser.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/libtracker-common/meson.build b/src/libtracker-common/meson.build index 96124437b..800c14771 100644 --- a/src/libtracker-common/meson.build +++ b/src/libtracker-common/meson.build @@ -53,6 +53,7 @@ libtracker_common = static_library('tracker-common', dependencies: [tracker_common_dependencies, gmodule], c_args: [ '-DPRIVATE_LIBDIR="@0@"'.format(tracker_internal_libs_dir), + '-DBUILD_LIBDIR="@0@"'.format(meson.current_build_dir()), '-DBUILDROOT="@0@"'.format(meson.build_root()), ] + tracker_c_args, include_directories: [configinc, srcinc], diff --git a/src/libtracker-common/tracker-parser.c b/src/libtracker-common/tracker-parser.c index aaaed58de..2300e284e 100644 --- a/src/libtracker-common/tracker-parser.c +++ b/src/libtracker-common/tracker-parser.c @@ -91,7 +91,7 @@ ensure_init_parser (void) * building introspection information or running tests. * We want the in-tree modules to be loaded then. */ - module_path = g_strdup_printf (BUILDROOT "/src/libtracker-common/%s", modules[i]); + module_path = g_strdup_printf (BUILD_LIBDIR "/%s", modules[i]); } else { module_path = g_strdup_printf (PRIVATE_LIBDIR "/%s", modules[i]); } |