diff options
author | axis <qt-info@nokia.com> | 2011-05-10 10:30:30 +0200 |
---|---|---|
committer | axis <qt-info@nokia.com> | 2011-05-10 11:14:36 +0200 |
commit | ba3436cda15fc342325699b182a120ba90a93283 (patch) | |
tree | 58da52bbfbc7bf2d6f48ba62116f6fef2d484b06 /bin | |
parent | edd56d531bedd83dc4decee5720bd75fffc0b44c (diff) |
Fixed detection of QtBase directory.
The old check would fail for an installed copy of Qt. Instead, base
the check on using QTDIR if it present, otherwise use the parent of
the bin directory, and then check that "mkspecs" is present.
Reviewed-by: Olivier Goffart
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/syncqt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/syncqt b/bin/syncqt index 3d25ecc817..6050d31e9e 100755 --- a/bin/syncqt +++ b/bin/syncqt @@ -27,8 +27,8 @@ our $quoted_basedir; # normally the script location should be enough, if not fall back to # QTDIR environment variable. If that doesn't work, later ask the # user to use the -qtdir option explicitly. -my $qtbasedir = dirname(dirname($0)); -$qtbasedir = $ENV{"QTDIR"} if ($qtbasedir !~ /qtbase/); +my $qtbasedir = $ENV{"QTDIR"}; +$qtbasedir = dirname(dirname($0)) if (!$qtbasedir); $qtbasedir =~ s=\\=/=g if (defined $qtbasedir); # will be defined based on the modules sync.profile @@ -717,7 +717,7 @@ while ( @ARGV ) { die "Cannot automatically detect/use provided path to QtBase's build directory!\n" . "QTDIR detected/provided: " . (defined $qtbasedir ? $qtbasedir : "-none-") . "\n" . "Please -qtdir option to provide the correct path.\nsyncqt failed" - if (!defined $qtbasedir || (!-e "$qtbasedir/.qmake.cache" && $qtbasedir !~ /qtbase/)); + if (!$qtbasedir || !-d "$qtbasedir/mkspecs"); # if we have no $basedir we cannot be sure which sources you want, so die die "Could not find any sync.profile for your module!\nPass <module directory> to syncqt to sync your header files.\nsyncqt failed" if (!$basedir); |