From bc2f71db6277e833943ee34c2d7749fd59f866a4 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Sun, 5 Mar 2023 12:09:04 +0100 Subject: 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") --- src/libtracker-common/meson.build | 1 + src/libtracker-common/tracker-parser.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libtracker-common') 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]); } -- cgit v1.2.1