Changeset 161328 in webkit


Ignore:
Timestamp:
Jan 5, 2014 8:09:02 PM (10 years ago)
Author:
Martin Robinson
Message:

[GTK][CMake] Add support for building the GTK+ port with cmake to build-webkit
https://bugs.webkit.org/show_bug.cgi?id=126212

Reviewed by Daniel Bates.

Allow building the GTK+ cmake port with --gtkcmake.

  • Scripts/build-webkit: Use the new isGtkCMake function to head down the CMake path

when appropriate. Skip the autotoos path when isGtkAutotools is false.

  • Scripts/webkitdirs.pm: Add an isGtkCMake path in addition to the newly renamed isGtkAutotools.
Add isGtk which checks isGtkCMake
isGtkAutotools

(determineArchitecture): Use the CMake path for GTK+ when appropriate.
(argumentsForConfiguration): use --gtkcmake when appropriate.
(jscProductDir): Look in the CMake directory when appropriate.
(builtDylibPathForName): CMake builds the library into a different directory, so handle that.
(determineIsGtkCMake): Added.
(isGtkCMake): Added.
(isGtkAutotools): Renamed from isGtk.

(isGtk): New function which returns isGtkAutotools
isGtkCMake.

(determineIsGtkAutotools): Renamed from determineIsGtk.
(cmakeBasedPortName): Added a GTK+ path.

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r161310 r161328  
     12014-01-05  Martin Robinson  <mrobinson@igalia.com>
     2
     3        [GTK][CMake] Add support for building the GTK+ port with cmake to build-webkit
     4        https://bugs.webkit.org/show_bug.cgi?id=126212
     5
     6        Reviewed by Daniel Bates.
     7
     8        Allow building the GTK+ cmake port with --gtkcmake.
     9
     10        * Scripts/build-webkit: Use the new isGtkCMake function to head down the CMake path
     11        when appropriate. Skip the autotoos path when isGtkAutotools is false.
     12        * Scripts/webkitdirs.pm: Add an isGtkCMake path in addition to the newly renamed isGtkAutotools.
     13        Add isGtk which checks isGtkCMake || isGtkAutotools
     14        (determineArchitecture): Use the CMake path for GTK+ when appropriate.
     15        (argumentsForConfiguration): use --gtkcmake when appropriate.
     16        (jscProductDir): Look in the CMake directory when appropriate.
     17        (builtDylibPathForName): CMake builds the library into a different directory, so handle that.
     18        (determineIsGtkCMake): Added.
     19        (isGtkCMake): Added.
     20        (isGtkAutotools): Renamed from isGtk.
     21        (isGtk): New function which returns isGtkAutotools || isGtkCMake.
     22        (determineIsGtkAutotools): Renamed from determineIsGtk.
     23        (cmakeBasedPortName): Added a GTK+ path.
     24
    1252014-01-04  Martin Robinson  <mrobinson@igalia.com>
    226
  • trunk/Tools/Scripts/build-webkit

    r159806 r161328  
    291291}
    292292
    293 if (isEfl()) {
     293if (isEfl() || isGtkCMake()) {
    294294    # By default we build using all of the available CPUs.
    295295    $makeArgs .= ($makeArgs ? " " : "") . "-j" . numberOfCPUs() if $makeArgs !~ /-j\s*\d+/;
     
    301301    removeCMakeCache();
    302302
    303     buildCMakeProjectOrExit($clean, "Efl", $prefixPath, $makeArgs, (cmakeBasedPortArguments(), cMakeArgsFromFeatures()), $cmakeArgs);
     303    my $portName = (isEfl() ? "Efl" : "GTK");
     304    buildCMakeProjectOrExit($clean, $portName, $prefixPath, $makeArgs, (cmakeBasedPortArguments(), cMakeArgsFromFeatures()), $cmakeArgs);
    304305}
    305306
     
    326327
    327328    # For Gtk the WebKit project builds all others
    328     if (isGtk() && $dir ne "Source/WebKit") {
     329    if (isGtkAutotools() && $dir ne "Source/WebKit") {
    329330        chdirWebKit();
    330331        next;
     
    333334    my $project = basename($dir);
    334335    my $baseProductDir = baseProductDir();
    335     if (isGtk()) {
     336    if (isGtkAutotools()) {
    336337        $result = buildGtkProject($project, $clean, $prefixPath, $makeArgs, $noWebKit1, $noWebKit2, @features);
    337338    } elsif (isAppleMacWebKit()) {
  • trunk/Tools/Scripts/webkitdirs.pm

    r161215 r161328  
    9191my $osXVersion;
    9292my $generateDsym;
    93 my $isGtk;
     93my $isGtkAutotools;
     94my $isGtkCMake;
    9495my $isWinCE;
    9596my $isWinCairo;
     
    292293    determineXcodeSDK();
    293294
    294     if (isGtk()) {
     295    if (isGtkAutotools()) {
    295296        determineConfigurationProductDir();
    296297        my $host_triple = `grep -E '^host = ' $configurationProductDir/GNUmakefile 2> /dev/null`;
     
    317318            }
    318319        }
    319     } elsif (isEfl() || isNix()) {
     320    } elsif (isEfl() || isNix() || isGtkCMake()) {
    320321        my $host_processor = "";
    321322        $host_processor = `cmake --system-information | grep CMAKE_SYSTEM_PROCESSOR`;
     
    380381    push(@args, '--32-bit') if ($architecture ne "x86_64" and !isWin64());
    381382    push(@args, '--64-bit') if (isWin64());
    382     push(@args, '--gtk') if isGtk();
     383    push(@args, '--gtk') if isGtkAutotools();
     384    push(@args, '--gtkcmake') if isGtkCMake();
    383385    push(@args, '--efl') if isEfl();
    384386    push(@args, '--nix') if isNix();
     
    533535{
    534536    my $productDir = productDir();
    535     $productDir .= "/bin" if (isEfl() || isNix());
    536     $productDir .= "/Programs" if isGtk();
     537    $productDir .= "/bin" if (isEfl() || isNix() || isGtkCMake());
     538    $productDir .= "/Programs" if isGtkAutotools();
    537539
    538540    return $productDir;
     
    778780        my $extension = isDarwin() ? ".dylib" : ".so";
    779781
     782        my $builtLibraryPath = "$configurationProductDir/.libs/";
     783        if (isGtkCMake()) {
     784            $builtLibraryPath = "$configurationProductDir/lib/";
     785        }
     786
    780787        foreach $libraryName (@libraries) {
    781             my $libraryPath = "$configurationProductDir/.libs/" . $libraryName . $extension;
     788            my $libraryPath = "$builtLibraryPath" . $libraryName . $extension;
    782789            return $libraryPath if -e $libraryPath;
    783790        }
     
    10461053}
    10471054
     1055sub determineIsGtkCMake()
     1056{
     1057    return if defined($isGtkCMake);
     1058    $isGtkCMake = checkForArgumentAndRemoveFromARGV("--gtkcmake");
     1059}
     1060
     1061sub isGtkCMake()
     1062{
     1063    determineIsGtkCMake();
     1064    return $isGtkCMake;
     1065}
     1066
    10481067sub determineIsNix()
    10491068{
     
    10571076    return $isNix;
    10581077}
     1078
     1079sub isGtkAutotools()
     1080{
     1081    determineIsGtkAutotools();
     1082    return $isGtkAutotools;
     1083}
     1084
    10591085sub isGtk()
    10601086{
    1061     determineIsGtk();
    1062     return $isGtk;
    1063 }
    1064 
    1065 sub determineIsGtk()
    1066 {
    1067     return if defined($isGtk);
    1068     $isGtk = checkForArgumentAndRemoveFromARGV("--gtk");
     1087    return isGtkCMake() || isGtkAutotools();
     1088}
     1089
     1090sub determineIsGtkAutotools()
     1091{
     1092    return if defined($isGtkAutotools);
     1093    $isGtkAutotools = checkForArgumentAndRemoveFromARGV("--gtk");
    10691094}
    10701095
     
    20972122    return "WinCE" if isWinCE();
    20982123    return "Nix" if isNix();
     2124    return "GTK" if isGtk();
    20992125    return "";
    21002126}
Note: See TracChangeset for help on using the changeset viewer.