summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2015-01-13 09:46:31 +0100
committerShawn Rutledge <shawn.rutledge@digia.com>2015-01-15 19:51:46 +0100
commit59789eb9ad2468cc6b839dfba4e5a57581effd74 (patch)
tree09be0dbb05f1bcf6334c7a220bdf76d5383abcc7
parent4360ffb48518a2c431503761fd4f5688f96a68a7 (diff)
set CMAKE_PREFIX_PATH
so that cmake can find the chosen Qt version when building packages that depend on Qt. Change-Id: Ifd8b85b331fc718a14f22c2e4dc3af1315a60a62 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
-rw-r--r--scripts/common.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/common.sh b/scripts/common.sh
index 3b6abb9..c599fd1 100644
--- a/scripts/common.sh
+++ b/scripts/common.sh
@@ -60,6 +60,7 @@ function qt_select()
# Remove old
qt_env_removefrom LD_LIBRARY_PATH $QTLIBDIR
qt_env_removefrom PKG_CONFIG_PATH $QTLIBDIR/pkgconfig
+ qt_env_removefrom CMAKE_PREFIX_PATH $QTDIR
# Add new
if [ x$1 != xnone ]; then
@@ -74,6 +75,9 @@ function qt_select()
QTDIR=$(qmake -query QT_INSTALL_PREFIX)
export QTDIR
+ qt_env_addto CMAKE_PREFIX_PATH $QTDIR
+ 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)