]> git.lyx.org Git - lyx.git/commitdiff
Force absolute paths with qmake
authorEnrico Forestieri <forenr@lyx.org>
Sun, 29 May 2022 09:57:58 +0000 (11:57 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Sun, 29 May 2022 09:57:58 +0000 (11:57 +0200)
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

index 8c1a818b33a2fa84fb1e222f902bb4973b1580e1..2cd4263f06c29376e04e40d749d0bedffc01e753 100644 (file)
@@ -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'`