summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2022-05-23 12:56:38 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2022-05-23 17:40:38 +0200
commit95c55b40f7670984ba39447bd695c78ac7d6df1f (patch)
tree759d3964f2ad3ffb34ce0b8cef3bec6c064c60b6 /configure.ac
parent9adc0e9d381e8469ac2fe67d1fb09dfddad225d8 (diff)
qt6 configure: Consider more paths to find Qt 6 moc
commit 88d57cf241209ffec9eaed3e523942ab51af6db6 Date: Wed Sep 29 11:09:51 2021 +0200 qt6: Add a qt6 VCL plugin mentioned: > 1) At least in my self-compiled Qt versions, > 'moc' (the meta-object compiler) is located > in the 'libexec' subdirectory in 'QT6DIR', while the > Qt 5 equivalent is located in the "bin" subdirectory > of 'QT5DIR', so the configure.ac check uses the former. Search for moc in the "libexec" subdirectory of all paths in `lib_dir` before trying `$PATH`, so e.g. the one provided as `/usr/lib/qt6/libexec/moc` by package "qt6-base-dev-tools" in Debian testing is found before a Qt 5 version in `$PATH`. With this change in place, building on Debian testing using the system Qt 6 works when building with autogen option `--enable-qt6` but no `QT6DIR` set and `/usr/bin/moc` points to the Qt 5 version of moc. Change-Id: I0471c73315224ffab018b350aff8d797a234a905 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134814 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index ee9fe810377c..bd9a1c3f8be6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13104,7 +13104,14 @@ then
dnl Check for Meta Object Compiler
- AC_PATH_PROGS( MOC6, [moc-qt6 moc], no, [`dirname $qt6_libdir`/libexec:$QT6DIR/libexec:$PATH])
+ for lib_dir in $qt6_libdirs; do
+ if test -z "$qt6_libexec_dirs"; then
+ qt6_libexec_dirs="$lib_dir/libexec"
+ else
+ qt6_libexec_dirs="$qt6_libexec_dirs:$lib_dir/libexec"
+ fi
+ done
+ AC_PATH_PROGS( MOC6, [moc-qt6 moc], no, [`dirname $qt6_libdir`/libexec:$QT6DIR/libexec:$qt6_libexec_dirs:$PATH])
if test "$MOC6" = "no"; then
AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
the root of your Qt installation by exporting QT6DIR before running "configure".])