From d7662e5586595ffe562623e792d6e836aedbbbaf Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sun, 29 May 2022 11:57:58 +0200 Subject: [PATCH] Force absolute paths with qmake When generating makefiles, by default qmake tries to use relative paths if it can replace at most 4 subdirs with "../" to reach the QTDIR from the project file location. This maximum can be changed by defining QMAKE_PROJECT_DEPTH, and setting it to zero forces qmake to always use absolute paths. This is necessary because the paths for includes and libs are generated by a temporary project file located in a temporary dir not corresponding to the real source dir. --- config/qt.m4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/qt.m4 b/config/qt.m4 index 8c1a818b33..2cd4263f06 100644 --- a/config/qt.m4 +++ b/config/qt.m4 @@ -424,6 +424,7 @@ qtHaveModule(core5compat): QT += core5compat percent.target = % percent.commands = @echo -n "\$(\$(@))\ " QMAKE_EXTRA_TARGETS += percent +QMAKE_PROJECT_DEPTH = 0 EOF1 $QT_QMAKE $lyx_test_qt_pro -o $lyx_test_qt_mak 1>/dev/null 2>&1 QT_CORE_INCLUDES=`cd $lyx_test_qt_dir; make -s -f $lyx_test_qt_mak INCPATH | sed 's/-I\. //g'` @@ -452,6 +453,7 @@ qtHaveModule(widgets): QT += widgets percent.target = % percent.commands = @echo -n "\$(\$(@))\ " QMAKE_EXTRA_TARGETS += percent +QMAKE_PROJECT_DEPTH = 0 EOF2 $QT_QMAKE $lyx_test_qt_pro -o $lyx_test_qt_mak 1>/dev/null 2>&1 QT_INCLUDES=`cd $lyx_test_qt_dir; make -s -f $lyx_test_qt_mak INCPATH | sed 's/-I\. //g'`