Fix check for qmake.

qmake isn't always named 'qmake'. kdesrc-build searches for qmake before
it runs to avoid having to take a long time to fail to build dozens of
modules, but should search for the same names looked for by the FindQt4
cmake check.

In addition to correcting the check, I've also fixed the usage of
'qmake' in the QMakeBuildSystem. Thanks for the prompt bug report! (And
please re-open if this fails for you, it's a bit more difficult for me
to thoroughly test)

BUG:299577
FIXED-IN:1.15.1
wilder
Michael Pyne 14 years ago
parent 8a00060139
commit 9b3a854711
  1. 25
      kdesrc-build

@ -3466,6 +3466,17 @@ EOF
return qw{qmake};
}
# Returns the absolute path to 'qmake'. Note the actual executable name may
# not necessarily be 'qmake' as some distributions rename it to allow for
# co-installability with Qt 3 (and 5...)
# If no suitable qmake can be found, undef is returned.
# This is a "static class method" i.e. use QMakeBuildSystem::absPathToQMake()
sub absPathToQMake
{
my @possibilities = qw/qmake qmake4 qmake-qt4 qmake-mac/;
return grep { absPathToExecutable($_) } @possibilities;
}
# Return value style: boolean
sub configureInternal
{
@ -3485,7 +3496,10 @@ EOF
}
p_chdir($builddir);
return log_command($module, 'qmake', [ 'qmake', $projectFiles[0] ]) == 0;
my $qmake = absPathToQMake();
return 0 unless $qmake;
return log_command($module, 'qmake', [ $qmake, $projectFiles[0] ]) == 0;
}
1;
@ -7771,7 +7785,14 @@ sub checkForEssentialBuildPrograms
cmake => 'CMake',
);
if (!absPathToExecutable($prog)) {
my $programPath = absPathToExecutable($prog);
# qmake is not necessarily named 'qmake'
if (!$programPath && $prog eq 'qmake') {
$programPath = QMakeBuildSystem::absPathToQMake();
}
if (!$programPath) {
# Don't complain about Qt if we're building it...
if ($prog eq 'qmake' && (
grep { $_->buildSystemType() eq 'Qt' } (@buildModules)) ||

Loading…
Cancel
Save