+2006-12-09 Simon Hausmann <hausmann@kde.org>
+
+ Reviewed by hyatt.
+
+ Add support for a QMake build using build-webkit --qmake
+
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+
2006-12-09 Zack Rusin <zack@kde.org>
Reviewed by Lars.
my $svgSupport = 1;
my $colorSupport = 1; # Default: colorize make output
+our @qmakeBuild;
+
GetOptions('svg!' => \$svgSupport,
- 'color!' => \$colorSupport);
+ 'color!' => \$colorSupport,
+ 'qmake!' => \@qmakeBuild);
checkRequiredSystemConfig();
setConfiguration();
chdir $dir or die;
my $result = 0;
if (isQt()) {
- if ($dir eq "WebKit") {
+ if (isQtWithQMake()) {
+ $result = buildQMakeProject($dir, $colorSupport);
+ } else {
$result = buildCMakeProject($dir, $colorSupport);
}
} elsif (isOSX()) {
return defined($ENV{'QTDIR'})
}
+sub isQtWithQMake()
+{
+ our @qmakeBuild;
+ return (isQt() and (@qmakeBuild eq 1))
+}
+
sub isCygwin()
{
return ($^O eq "cygwin");
return $result;
}
+sub buildQMakeProject($$)
+{
+ my ($project, $colorize) = @_;
+
+ if ($project ne "WebKit") {
+ die "Qt/Linux builds JavaScriptCore/WebCore/WebKitQt in one shot! Only call it for 'WebKit'.\n";
+ }
+
+ my $config = configuration();
+ my $prefix = $ENV{"WebKitInstallationPrefix"};
+
+ my @buildArgs = ("-r");
+ push @buildArgs, "OUTPUT_DIR=" . baseProductDir() . "/$config";
+ push @buildArgs, "../../webkit.pro";
+
+ print "Calling 'qmake @buildArgs' in " . baseProductDir() . "/$config ...\n\n";
+ print "Installation directory: $prefix\n" if(defined($prefix));
+
+ system "mkdir -p " . baseProductDir() . "/$config";
+ chdir baseProductDir() . "/$config" or die "Failed to cd into " . baseProductDir() . "/$config \n";
+
+ my $result = system "qmake", @buildArgs;
+ if($result ne 0) {
+ die "Failed to setup build environment using qmake!\n";
+ }
+
+ $result = system "make";
+ chdir ".." or die;
+ return $result;
+}
+
1;