diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2016-03-08 18:46:22 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2016-03-16 12:34:42 +0000 |
commit | 0d14cb4ee8b3f12299c059684b75d7bdd0e0684b (patch) | |
tree | 576d89fd0f08e400faaacd2f3d49d01d81fce610 | |
parent | d20fdc6379f0821e53f0449ec200c2ec5ea2889b (diff) |
Fix locating src dir
.qmake.cache is empty for qtbase builds. Instead use the Project: line in the
Makefile to guess where the sources are.
Change-Id: I112a583df8ed03f909df752f3db96ec6e707f71b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
-rw-r--r-- | scripts/common.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/common.sh b/scripts/common.sh index c599fd1..3cbfdb5 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -79,8 +79,8 @@ function qt_select() export CMAKE_PREFIX_PATH # is this an uninstalled Qt build dir? - if [ -f $QTDIR/.qmake.cache ]; then - QTSRCDIR=$(sed -n '/QT_SOURCE_TREE *= */{s///;s/\$\$quote(\(.*\))$/\1/;p;}' $QTDIR/.qmake.cache) + if [ -f $QTDIR/Makefile ]; then + QTSRCDIR=$(dirname $(awk '/Project:/{print $NF}' $QTDIR/Makefile)) export QTSRCDIR else unset QTSRCDIR |