[Win] Switch to CMake
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Sep 2015 21:50:48 +0000 (21:50 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Sep 2015 21:50:48 +0000 (21:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=148111

Reviewed by Brent Fulgham.

.:

* Source/cmake/WinTools.make: Added.
* Source/cmake/tools: Added.
* Source/cmake/tools/scripts: Copied from WebKitLibraries/win/tools/scripts.
* Source/cmake/tools/scripts/auto-version.pl: Copied from WebKitLibraries/win/tools/scripts/auto-version.pl.

Source/JavaScriptCore:

* JavaScriptCore.vcxproj/JavaScriptCore.proj:

Source/WebCore:

* WebCore.vcxproj/WebCore.proj:

Source/WebKit:

* WebKit.vcxproj/WebKit.proj:

Source/WTF:

* WTF.vcxproj/WTF.proj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190253 268f45cc-cd09-0410-ab3c-d52691b4dbfc

15 files changed:
ChangeLog
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.proj
Source/WTF/ChangeLog
Source/WTF/WTF.vcxproj/WTF.proj
Source/WebCore/ChangeLog
Source/WebCore/WebCore.vcxproj/WebCore.proj
Source/WebKit/ChangeLog
Source/WebKit/WebKit.vcxproj/WebKit.proj
Source/cmake/WinTools.make [new file with mode: 0644]
Source/cmake/tools/scripts/COPYRIGHT-END-YEAR [new file with mode: 0644]
Source/cmake/tools/scripts/VERSION [new file with mode: 0644]
Source/cmake/tools/scripts/auto-version.pl [new file with mode: 0755]
Source/cmake/tools/scripts/feature-defines.pl [new file with mode: 0755]
Source/cmake/tools/scripts/version-stamp.pl [new file with mode: 0644]

index b68b9d4..b383a3e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2015-09-25  Alex Christensen  <achristensen@webkit.org>
 
+        [Win] Switch to CMake
+        https://bugs.webkit.org/show_bug.cgi?id=148111
+
+        Reviewed by Brent Fulgham.
+
+        * Source/cmake/WinTools.make: Added.
+        * Source/cmake/tools: Added.
+        * Source/cmake/tools/scripts: Copied from WebKitLibraries/win/tools/scripts.
+        * Source/cmake/tools/scripts/auto-version.pl: Copied from WebKitLibraries/win/tools/scripts/auto-version.pl.
+
+2015-09-25  Alex Christensen  <achristensen@webkit.org>
+
         Prepare internal AppleWin build for CMake
         https://bugs.webkit.org/show_bug.cgi?id=149570
 
index a3fdab7..f1bd643 100644 (file)
@@ -1,3 +1,12 @@
+2015-09-25  Alex Christensen  <achristensen@webkit.org>
+
+        [Win] Switch to CMake
+        https://bugs.webkit.org/show_bug.cgi?id=148111
+
+        Reviewed by Brent Fulgham.
+
+        * JavaScriptCore.vcxproj/JavaScriptCore.proj:
+
 2015-09-24  Mark Lam  <mark.lam@apple.com>
 
         Remove the use of "Immediate" in JIT function names.
index b89bac4..9774ff3 100644 (file)
@@ -3,19 +3,20 @@
 \r
   <!-- normalize configuration case -->\r
   <PropertyGroup Condition="'$(CONFIGURATION)'=='Release'">\r
-       <CONFIG>Production</CONFIG>\r
+       <CONFIG>Release</CONFIG>\r
     <DebugSuffix></DebugSuffix>\r
+    <DebugSuffixDefinition></DebugSuffixDefinition>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(CONFIGURATION)'=='Debug'">\r
-       <CONFIG>DebugSuffix</CONFIG>\r
+       <CONFIG>Debug</CONFIG>\r
     <DebugSuffix>_debug</DebugSuffix>\r
+    <DebugSuffixDefinition>-DDEBUG_SUFFIX=_debug</DebugSuffixDefinition>\r
   </PropertyGroup>\r
 \r
   <!-- Wrapper to build JavaScriptCore for both win32 and x64. -->\r
   <PropertyGroup>\r
     <OFFICIAL_BUILD>1</OFFICIAL_BUILD>\r
     <WebKit_Libraries>$(SRCROOT)\AppleInternal</WebKit_Libraries>\r
-    <WebKit_OutputDir>$(OBJROOT)</WebKit_OutputDir>\r
     <AppleInternal>$(DSTROOT)\AppleInternal</AppleInternal>\r
     <AppleInternalLib32>$(AppleInternal)\lib32</AppleInternalLib32>\r
     <AppleInternalLib64>$(AppleInternal)\lib64</AppleInternalLib64>\r
     <ProgramFilesAAS64>Program Files\Common Files\Apple\Apple Application Support</ProgramFilesAAS64>\r
     <ConfigurationBuildDir>$(OBJROOT)\$(CONFIG)</ConfigurationBuildDir>  \r
     <OutputDirectory>$(DSTROOT)</OutputDirectory>\r
+       <CMakeCommandCommon>cmake $(SRCROOT)/JavaScriptCore -DPORT=AppleWin $(DebugSuffixDefinition) -DWEBKIT_LIBRARIES_DIR=$(WebKit_Libraries.Replace('\','/')) -DCMAKE_MODULE_PATH=$(SRCROOT.Replace('\','/'))/AppleInternal/tools/cmake -DCMAKE_BINARY_DIR=$(OBJROOT.Replace('\','/'))/$(CONFIG) -DJAVASCRIPTCORE_DIR=$(SRCROOT.Replace('\','/'))/JavaScriptCore</CMakeCommandCommon>\r
   </PropertyGroup>\r
-\r
-  <ItemGroup>\r
-    <JavaScriptCore Include="JavaScriptCore.submit.sln">\r
-      <AdditionalProperties>Platform=Win32;WEBKIT_OUTPUTDIR=$(WebKit_OutputDir);WEBKIT_LIBRARIES=$(WebKit_Libraries);OFFICIAL_BUILD=$(OFFICIAL_BUILD)</AdditionalProperties>\r
-    </JavaScriptCore>\r
-    <JavaScriptCore Include="JavaScriptCore.submit.sln">\r
-      <AdditionalProperties>Platform=x64;WEBKIT_OUTPUTDIR=$(WebKit_OutputDir);WEBKIT_LIBRARIES=$(WebKit_Libraries);OFFICIAL_BUILD=$(OFFICIAL_BUILD)</AdditionalProperties>\r
-    </JavaScriptCore>\r
-  </ItemGroup>\r
  \r
   <!-- Prepare for build -->\r
   <Target Name="PreBuild" BeforeTargets="Build">\r
     <Error Text="DSTROOT property or environment variable must be defined." Condition="'$(DSTROOT)' == ''" />\r
     <Error Text="OBJROOT property or environment variable must be defined." Condition="'$(OBJROOT)' == ''" />\r
+    <Error Text="Use /p:Configuration=Debug or /p:Configuration=Release" Condition="'$(CONFIG)' == ''" />\r
     <Message Text="Copying necessary headers to $(ConfigurationBuildDir)" />\r
-    <MakeDir Directories="$(DSTROOT);$(OBJROOT);$(ConfigurationBuildDir)\include\private" />\r
+    <MakeDir Directories="$(DSTROOT);$(OBJROOT);$(OBJROOT)/$(CONFIG);$(ConfigurationBuildDir)\include\private;$(OBJROOT)/$(CONFIG)/build32;$(OBJROOT)/$(CONFIG)/build64" />\r
  \r
     <CreateItem Include="$(WebKit_Libraries)\include\private\**\*.*">\r
       <Output TaskParameter="Include" ItemName="PrivateIncFiles" />\r
     <Message Text="Final output -> $(DSTROOT)" />\r
     <MakeDir Directories="$(AppleInternalLib32);$(AppleInternalLib64);$(AppleInternalBin32);$(AppleInternalBin64);$(AppleInternal32Symbols);$(AppleInternal64Symbols);$(AppleInternal)\include;$(DSTROOT)\$(ProgramFilesAAS32);$(DSTROOT)\$(ProgramFilesAAS64)" />\r
     <MakeDir Directories="$(DSTROOT)\$(ProgramFilesAAS32)\JavaScriptCore.resources;$(DSTROOT)\$(ProgramFilesAAS64)\JavaScriptCore.resources" />\r
-    <MakeDir Directories="$(DSTROOT)\AppleInternal\Sources32\JavaScriptCore;$(DSTROOT)\AppleInternal\Sources64\JavaScriptCore" />\r
   </Target>\r
 \r
   <!-- Build JavaScriptCore Software -->\r
   <Target Name="Build" AfterTargets="PreBuild">\r
     <Message Text="Building $(CONFIGURATION) Solution" />\r
     <Error Text="DSTROOT property or environment variable must be defined." Condition="'$(DSTROOT)' == ''" />\r
-    <Message Text="Output=$(WebKit_OutputDir)" />\r
-    <MSBuild Projects="@(JavaScriptCore)" Properties="Configuration=$(CONFIG)" Targets="Build" />\r
+       <Exec Command="$(CMakeCommandCommon) -DWTF_CPU_X86=1 -G &quot;Visual Studio 14 2015&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>\r
+       <Exec Command="msbuild Project.sln" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>\r
+       <Exec Command="$(CMakeCommandCommon) -DWTF_CPU_X86_64=1 -G &quot;Visual Studio 14 2015 Win64&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>\r
+       <Exec Command="msbuild Project.sln" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>\r
   </Target>\r
 \r
   <Target Name="PostBuild" AfterTargets="Build">\r
     <Message Text="Moving $(CONFIG) build results to $(DSTROOT)" />\r
 \r
     <!-- Identify the files to copy over -->\r
-    <CreateItem Include="$(ConfigurationBuildDir)\include\**\*.*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\DerivedSources\ForwardingHeaders\JavaScriptCore\**\*.*">\r
       <Output TaskParameter="Include" ItemName="IncFiles" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin32\*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\bin32\*">\r
       <Output TaskParameter="Include" ItemName="Bin32Files" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin64\*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\bin64\*">\r
       <Output TaskParameter="Include" ItemName="Bin64Files" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin32\*.pdb">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\bin32\*.pdb">\r
       <Output TaskParameter="Include" ItemName="Bin32SymbolFiles" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin64\*.pdb">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\bin64\*.pdb">\r
       <Output TaskParameter="Include" ItemName="Bin64SymbolFiles" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin32\JavaScriptCore$(DebugSuffix).dll">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\bin32\JavaScriptCore$(DebugSuffix).dll">\r
       <Output TaskParameter="Include" ItemName="Bin32DLLFiles" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin64\JavaScriptCore$(DebugSuffix).dll">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\bin64\JavaScriptCore$(DebugSuffix).dll">\r
       <Output TaskParameter="Include" ItemName="Bin64DLLFiles" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin32\*.resources">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\bin32\*.resources">\r
       <Output TaskParameter="Include" ItemName="Bin32ResourceFolders" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin64\*.resources">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\bin64\*.resources">\r
       <Output TaskParameter="Include" ItemName="Bin64ResourceFolders" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin32\JavaScriptCore.resources\**\*.*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\bin32\JavaScriptCore.resources\**\*.*">\r
       <Output TaskParameter="Include" ItemName="Bin32Resources" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin64\JavaScriptCore.resources\**\*.*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\bin64\JavaScriptCore.resources\**\*.*">\r
       <Output TaskParameter="Include" ItemName="Bin64Resources" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\lib32\*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\lib32\*">\r
       <Output TaskParameter="Include" ItemName="Lib32Files" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\lib64\*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\lib64\*">\r
       <Output TaskParameter="Include" ItemName="Lib64Files" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\obj32\JavaScriptCore\DerivedSources\**\*.*">\r
-      <Output TaskParameter="Include" ItemName="Derived32Sources" />\r
-    </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\obj64\JavaScriptCore\DerivedSources\**\*.*">\r
-      <Output TaskParameter="Include" ItemName="Derived64Sources" />\r
-    </CreateItem>\r
 \r
-    <Copy SourceFiles="@(IncFiles)" DestinationFiles="@(IncFiles->'$(DSTROOT)\AppleInternal\include\%(RecursiveDir)%(Filename)%(Extension)')" />\r
+    <Copy SourceFiles="@(IncFiles)" DestinationFiles="@(IncFiles->'$(DSTROOT)\AppleInternal\include\private\JavaScriptCore\%(RecursiveDir)%(Filename)%(Extension)')" />\r
     <Copy SourceFiles="@(Lib32Files)" DestinationFolder="$(AppleInternalLib32)" />\r
     <Copy SourceFiles="@(Lib64Files)" DestinationFolder="$(AppleInternalLib64)" />\r
     <Copy SourceFiles="@(Bin32Files)" DestinationFolder="$(AppleInternalBin32)" />\r
     <Copy SourceFiles="@(Bin64ResourceFolders)" DestinationFolder="$(DSTROOT)\$(ProgramFilesAAS64)" />\r
     <Copy SourceFiles="@(Bin64SymbolFiles)" DestinationFolder="$(AppleInternal64Symbols)" />\r
     <Copy SourceFiles="@(Bin64Resources)" DestinationFiles="@(Bin64Resources->'$(DSTROOT)\$(ProgramFilesAAS64)\JavaScriptCore.resources\%(RecursiveDir)%(Filename)%(Extension)')" />\r
-    <Copy SourceFiles="@(Derived32Sources)" DestinationFiles="@(Derived32Sources->'$(DSTROOT)\AppleInternal\Sources32\JavaScriptCore\%(RecursiveDir)%(Filename)%(Extension)')" />\r
-    <Copy SourceFiles="@(Derived64Sources)" DestinationFiles="@(Derived64Sources->'$(DSTROOT)\AppleInternal\Sources64\JavaScriptCore\%(RecursiveDir)%(Filename)%(Extension)')" />\r
   </Target>\r
 \r
 </Project>\r
index beff15f..c76abcf 100644 (file)
@@ -1,3 +1,12 @@
+2015-09-25  Alex Christensen  <achristensen@webkit.org>
+
+        [Win] Switch to CMake
+        https://bugs.webkit.org/show_bug.cgi?id=148111
+
+        Reviewed by Brent Fulgham.
+
+        * WTF.vcxproj/WTF.proj:
+
 2015-09-25  Joseph Pecoraro  <pecoraro@apple.com>
 
         Simplify Stopwatch::elapsedTime
index 504820b..dad6872 100644 (file)
@@ -3,19 +3,20 @@
 \r
   <!-- normalize configuration case -->\r
   <PropertyGroup Condition="'$(CONFIGURATION)'=='Release'">\r
-       <CONFIG>Production</CONFIG>\r
+       <CONFIG>Release</CONFIG>\r
     <DebugSuffix></DebugSuffix>\r
+    <DebugSuffixDefinition></DebugSuffixDefinition>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(CONFIGURATION)'=='Debug'">\r
-       <CONFIG>DebugSuffix</CONFIG>\r
+       <CONFIG>Debug</CONFIG>\r
     <DebugSuffix>_debug</DebugSuffix>\r
+    <DebugSuffixDefinition>-DDEBUG_SUFFIX=_debug</DebugSuffixDefinition>\r
   </PropertyGroup>\r
 \r
   <!-- Wrapper to build WTF for both win32 and x64. -->\r
   <PropertyGroup>\r
     <OFFICIAL_BUILD>1</OFFICIAL_BUILD>\r
     <WebKit_Libraries>$(SRCROOT)\AppleInternal</WebKit_Libraries>\r
-    <WebKit_OutputDir>$(OBJROOT)</WebKit_OutputDir>\r
     <AppleInternal>$(DSTROOT)\AppleInternal</AppleInternal>\r
     <AppleInternalLib32>$(AppleInternal)\lib32</AppleInternalLib32>\r
     <AppleInternalLib64>$(AppleInternal)\lib64</AppleInternalLib64>\r
     <AppleInternal64Symbols>$(AppleInternal)\public64\sym</AppleInternal64Symbols>\r
     <ProgramFilesAAS32>Program Files (x86)\Common Files\Apple\Apple Application Support</ProgramFilesAAS32>\r
     <ProgramFilesAAS64>Program Files\Common Files\Apple\Apple Application Support</ProgramFilesAAS64>\r
-    <ConfigurationBuildDir>$(OBJROOT)\$(CONFIG)</ConfigurationBuildDir>  \r
+    <ConfigurationBuildDir>$(OBJROOT)\$(CONFIG)</ConfigurationBuildDir>\r
     <OutputDirectory>$(DSTROOT)</OutputDirectory>\r
+       <CMakeCommandCommon>cmake $(SRCROOT)/WTF -DPORT=AppleWin $(DebugSuffixDefinition) -DWEBKIT_LIBRARIES_DIR=$(WebKit_Libraries.Replace('\','/')) -DCMAKE_MODULE_PATH=$(SRCROOT.Replace('\','/'))/AppleInternal/tools/cmake -DCMAKE_BINARY_DIR=$(OBJROOT.Replace('\','/'))/$(CONFIG) -DWTF_DIR=$(SRCROOT.Replace('\','/'))/WTF</CMakeCommandCommon>\r
   </PropertyGroup>\r
 \r
-  <ItemGroup>\r
-    <WTF Include="WTF.submit.sln">\r
-      <AdditionalProperties>Platform=Win32;WEBKIT_OUTPUTDIR=$(WebKit_OutputDir);WEBKIT_LIBRARIES=$(WebKit_Libraries);OFFICIAL_BUILD=$(OFFICIAL_BUILD)</AdditionalProperties>\r
-    </WTF>\r
-    <WTF Include="WTF.submit.sln">\r
-      <AdditionalProperties>Platform=x64;WEBKIT_OUTPUTDIR=$(WebKit_OutputDir);WEBKIT_LIBRARIES=$(WebKit_Libraries);OFFICIAL_BUILD=$(OFFICIAL_BUILD)</AdditionalProperties>\r
-    </WTF>\r
-  </ItemGroup>\r
-\r
   <!-- Prepare for build -->\r
   <Target Name="PreBuild" BeforeTargets="Build">\r
     <Error Text="DSTROOT property or environment variable must be defined." Condition="'$(DSTROOT)' == ''" />\r
     <Error Text="OBJROOT property or environment variable must be defined." Condition="'$(OBJROOT)' == ''" />\r
-    <MakeDir Directories="$(DSTROOT);$(OBJROOT)" />\r
+    <Error Text="Use /p:Configuration=Debug or /p:Configuration=Release" Condition="'$(CONFIG)' == ''" />\r
+    <MakeDir Directories="$(DSTROOT);$(OBJROOT);$(OBJROOT)/$(CONFIG);$(OBJROOT)/$(CONFIG)/build32;$(OBJROOT)/$(CONFIG)/build64" />\r
     <Message Text="Build output -> $(OBJROOT)" />\r
     <Message Text="Final output -> $(DSTROOT)" />\r
     <MakeDir Directories="$(AppleInternalLib32);$(AppleInternalLib64);$(AppleInternalBin32);$(AppleInternalBin64);$(AppleInternal32Symbols);$(AppleInternal64Symbols);$(AppleInternal)\include;$(DSTROOT)\$(ProgramFilesAAS32);$(DSTROOT)\$(ProgramFilesAAS64)" />\r
   <Target Name="Build" AfterTargets="PreBuild">\r
     <Message Text="Building $(CONFIGURATION) Solution" />\r
     <Error Text="DSTROOT property or environment variable must be defined." Condition="'$(DSTROOT)' == ''" />\r
-    <Message Text="Output=$(WebKit_OutputDir)" />\r
-    <MSBuild Projects="@(WTF)" Properties="Configuration=$(CONFIG)" Targets="ReBuild" />\r
+       <Exec Command="$(CMakeCommandCommon) -G &quot;Visual Studio 14 2015&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>\r
+       <Exec Command="msbuild Project.sln" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>\r
+       <Exec Command="$(CMakeCommandCommon) -G &quot;Visual Studio 14 2015 Win64&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>\r
+       <Exec Command="msbuild Project.sln" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>\r
   </Target>\r
 \r
   <Target Name="PostBuild" AfterTargets="Build">\r
     <Message Text="Moving $(CONFIG) build results to $(DSTROOT)" />\r
  \r
     <!-- Identify the files to copy over -->\r
-    <CreateItem Include="$(ConfigurationBuildDir)\include\**\*.*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\DerivedSources\ForwardingHeaders\WTF\**\*.*">\r
       <Output TaskParameter="Include" ItemName="IncFiles" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin32\*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\bin32\*">\r
        <Output TaskParameter="Include" ItemName="Bin32Files" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin64\*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\bin64\*">\r
        <Output TaskParameter="Include" ItemName="Bin64Files" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin32\WTF$(DebugSuffix).dll">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\bin32\WTF$(DebugSuffix).dll">\r
       <Output TaskParameter="Include" ItemName="Bin32DLLFiles" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin64\WTF$(DebugSuffix).dll">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\bin64\WTF$(DebugSuffix).dll">\r
       <Output TaskParameter="Include" ItemName="Bin64DLLFiles" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin32\*.pdb">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\bin32\*.pdb">\r
        <Output TaskParameter="Include" ItemName="Bin32SymbolFiles" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin64\*.pdb">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\bin64\*.pdb">\r
        <Output TaskParameter="Include" ItemName="Bin64SymbolFiles" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\lib32\*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\lib32\*">\r
        <Output TaskParameter="Include" ItemName="Lib32Files" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\lib64\*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\lib64\*">\r
        <Output TaskParameter="Include" ItemName="Lib64Files" />\r
     </CreateItem>\r
  \r
-    <Copy SourceFiles="@(IncFiles)" DestinationFiles="@(IncFiles->'$(DSTROOT)\AppleInternal\include\%(RecursiveDir)%(Filename)%(Extension)')" />\r
+    <Copy SourceFiles="@(IncFiles)" DestinationFiles="@(IncFiles->'$(DSTROOT)\AppleInternal\include\private\wtf\%(RecursiveDir)%(Filename)%(Extension)')" />\r
     <Copy SourceFiles="@(Lib32Files)" DestinationFolder="$(AppleInternalLib32)" />\r
     <Copy SourceFiles="@(Lib64Files)" DestinationFolder="$(AppleInternalLib64)" />\r
     <Copy SourceFiles="@(Bin32Files)" DestinationFolder="$(AppleInternalBin32)" />\r
   </Target>\r
 \r
 </Project>\r
-\r
index 36b0859..b710110 100644 (file)
@@ -1,3 +1,12 @@
+2015-09-25  Alex Christensen  <achristensen@webkit.org>
+
+        [Win] Switch to CMake
+        https://bugs.webkit.org/show_bug.cgi?id=148111
+
+        Reviewed by Brent Fulgham.
+
+        * WebCore.vcxproj/WebCore.proj:
+
 2015-09-25  Beth Dakin  <bdakin@apple.com>
 
         Clicking on a data detected item inside a form control always pops up a map 
index 04b8d62..6ca6ac8 100644 (file)
@@ -3,18 +3,20 @@
 \r
   <!-- normalize configuration case -->\r
   <PropertyGroup Condition="'$(CONFIGURATION)'=='Release'">\r
-       <CONFIG>Production</CONFIG>\r
+       <CONFIG>Release</CONFIG>\r
+    <DebugSuffix></DebugSuffix>\r
+    <DebugSuffixDefinition></DebugSuffixDefinition>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(CONFIGURATION)'=='Debug'">\r
-       <CONFIG>DebugSuffix</CONFIG>\r
+       <CONFIG>Debug</CONFIG>\r
+    <DebugSuffix>_debug</DebugSuffix>\r
+    <DebugSuffixDefinition>-DDEBUG_SUFFIX=_debug</DebugSuffixDefinition>\r
   </PropertyGroup>\r
 \r
   <!-- Wrapper to build WebCore for both win32 and x64. -->\r
   <PropertyGroup>\r
     <OFFICIAL_BUILD>1</OFFICIAL_BUILD>\r
-    <DXSDK_DIR>C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\</DXSDK_DIR>\r
     <WebKit_Libraries>$(SRCROOT)\AppleInternal</WebKit_Libraries>\r
-    <WebKit_OutputDir>$(OBJROOT)</WebKit_OutputDir>\r
     <AppleInternal>$(DSTROOT)\AppleInternal</AppleInternal>\r
     <AppleInternalLib32>$(AppleInternal)\lib32</AppleInternalLib32>\r
     <AppleInternalLib64>$(AppleInternal)\lib64</AppleInternalLib64>\r
     <ProgramFilesAAS64>Program Files\Common Files\Apple\Apple Application Support</ProgramFilesAAS64>\r
     <ConfigurationBuildDir>$(OBJROOT)\$(CONFIG)</ConfigurationBuildDir>  \r
     <OutputDirectory>$(DSTROOT)</OutputDirectory>\r
+       <CMakeCommandCommon>cmake $(SRCROOT)/WebCore -DPORT=AppleWin $(DebugSuffixDefinition) -DINTERNAL_BUILD=1 -DWEBKIT_LIBRARIES_DIR=$(WebKit_Libraries.Replace('\','/')) -DCMAKE_MODULE_PATH=$(SRCROOT.Replace('\','/'))/AppleInternal/tools/cmake -DCMAKE_BINARY_DIR=$(OBJROOT.Replace('\','/'))/$(CONFIG) -DWEBCORE_DIR=$(SRCROOT.Replace('\','/'))/WebCore</CMakeCommandCommon>\r
   </PropertyGroup>\r
-\r
-  <ItemGroup>\r
-    <WebCore Include="WebCore.submit.sln">\r
-      <AdditionalProperties>Platform=Win32;WEBKIT_OUTPUTDIR=$(WebKit_OutputDir);WEBKIT_LIBRARIES=$(WebKit_Libraries);OFFICIAL_BUILD=$(OFFICIAL_BUILD);DXSDK_DIR=$(DXSDK_DIR)</AdditionalProperties>\r
-    </WebCore>\r
-    <WebCore Include="WebCore.submit.sln">\r
-      <AdditionalProperties>Platform=x64;WEBKIT_OUTPUTDIR=$(WebKit_OutputDir);WEBKIT_LIBRARIES=$(WebKit_Libraries);OFFICIAL_BUILD=$(OFFICIAL_BUILD);DXSDK_DIR=$(DXSDK_DIR)</AdditionalProperties>\r
-    </WebCore>\r
-  </ItemGroup>\r
  \r
   <!-- Prepare for build -->\r
   <Target Name="PreBuild" BeforeTargets="Build">\r
     <Error Text="DSTROOT property or environment variable must be defined." Condition="'$(DSTROOT)' == ''" />\r
     <Error Text="OBJROOT property or environment variable must be defined." Condition="'$(OBJROOT)' == ''" />\r
+    <Error Text="Use /p:Configuration=Debug or /p:Configuration=Release" Condition="'$(CONFIG)' == ''" />\r
     <Message Text="Copying necessary headers to $(ConfigurationBuildDir)" />\r
-    <MakeDir Directories="$(DSTROOT);$(OBJROOT);$(ConfigurationBuildDir)\include\private" />\r
+    <MakeDir Directories="$(DSTROOT);$(OBJROOT);$(OBJROOT)/$(CONFIG);$(ConfigurationBuildDir)\include\private;$(OBJROOT)/$(CONFIG)/build32;$(OBJROOT)/$(CONFIG)/build64" />\r
  \r
     <CreateItem Include="$(WebKit_Libraries)\include\private\**\*.*">\r
       <Output TaskParameter="Include" ItemName="PrivateIncFiles" />\r
     <Message Text="Final output -> $(DSTROOT)" />\r
     <MakeDir Directories="$(AppleInternalLib32);$(AppleInternalLib64);$(AppleInternalBin32);$(AppleInternalBin64);$(AppleInternal32Symbols);$(AppleInternal64Symbols);$(AppleInternal)\include;$(DSTROOT)\$(ProgramFilesAAS32);$(DSTROOT)\$(ProgramFilesAAS64)" />\r
     <MakeDir Directories="$(DSTROOT)\$(ProgramFilesAAS32)\WebKit.resources;$(DSTROOT)\$(ProgramFilesAAS64)\WebKit.resources" />\r
-    <MakeDir Directories="$(DSTROOT)\AppleInternal\Sources32\WebCore;$(DSTROOT)\AppleInternal\Sources64\WebCore" />\r
   </Target>\r
 \r
   <!-- Build WebCore Software -->\r
   <Target Name="Build" AfterTargets="PreBuild">\r
     <Message Text="Building $(CONFIGURATION) Solution" />\r
     <Error Text="DSTROOT property or environment variable must be defined." Condition="'$(DSTROOT)' == ''" />\r
-    <Message Text="Output=$(WebKit_OutputDir)" />\r
-    <MSBuild Projects="@(WebCore)" Properties="Configuration=$(CONFIG)" Targets="ReBuild" />\r
+       <Exec Command="$(CMakeCommandCommon) -G &quot;Visual Studio 14 2015&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>\r
+       <Exec Command="msbuild Project.sln" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>\r
+       <Exec Command="$(CMakeCommandCommon) -G &quot;Visual Studio 14 2015 Win64&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>\r
+       <Exec Command="msbuild Project.sln" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>\r
   </Target>\r
 \r
   <Target Name="PostBuild" AfterTargets="Build">\r
     <Message Text="Moving $(CONFIG) build results to $(DSTROOT)" />\r
 \r
     <!-- Identify the files to copy over -->\r
-    <CreateItem Include="$(ConfigurationBuildDir)\include\**\*.*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\DerivedSources\ForwardingHeaders\WebCore\**\*.*">\r
       <Output TaskParameter="Include" ItemName="IncFiles" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin32\*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\bin32\*">\r
       <Output TaskParameter="Include" ItemName="Bin32Files" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin64\*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\bin64\*">\r
       <Output TaskParameter="Include" ItemName="Bin64Files" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin32\*.pdb">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\bin32\*.pdb">\r
       <Output TaskParameter="Include" ItemName="Bin32SymbolFiles" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin64\*.pdb">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\bin64\*.pdb">\r
       <Output TaskParameter="Include" ItemName="Bin64SymbolFiles" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin32\WebKit.resources\**\*.*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\bin32\WebKit.resources\**\*.*">\r
       <Output TaskParameter="Include" ItemName="Bin32Resources" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin64\WebKit.resources\**\*.*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\bin64\WebKit.resources\**\*.*">\r
       <Output TaskParameter="Include" ItemName="Bin64Resources" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\lib32\*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\lib32\*">\r
       <Output TaskParameter="Include" ItemName="Lib32Files" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\lib64\*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\lib64\*">\r
       <Output TaskParameter="Include" ItemName="Lib64Files" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\obj32\WebCore\DerivedSources\**\*.*">\r
-      <Output TaskParameter="Include" ItemName="Derived32Sources" />\r
-    </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\obj64\WebCore\DerivedSources\**\*.*">\r
-      <Output TaskParameter="Include" ItemName="Derived64Sources" />\r
-    </CreateItem>\r
 \r
-    <Copy SourceFiles="@(IncFiles)" DestinationFiles="@(IncFiles->'$(DSTROOT)\AppleInternal\include\%(RecursiveDir)%(Filename)%(Extension)')" />\r
+    <Copy SourceFiles="@(IncFiles)" DestinationFiles="@(IncFiles->'$(DSTROOT)\AppleInternal\include\private\WebCore\%(RecursiveDir)%(Filename)%(Extension)')" />\r
     <Copy SourceFiles="@(Lib32Files)" DestinationFolder="$(AppleInternalLib32)" />\r
     <Copy SourceFiles="@(Lib64Files)" DestinationFolder="$(AppleInternalLib64)" />\r
     <Copy SourceFiles="@(Bin32Files)" DestinationFolder="$(AppleInternalBin32)" />\r
     <Copy SourceFiles="@(Bin64Files)" DestinationFolder="$(AppleInternalBin64)" />\r
     <Copy SourceFiles="@(Bin64SymbolFiles)" DestinationFolder="$(AppleInternal64Symbols)" />\r
     <Copy SourceFiles="@(Bin64Resources)" DestinationFiles="@(Bin64Resources->'$(DSTROOT)\$(ProgramFilesAAS64)\WebKit.resources\%(RecursiveDir)%(Filename)%(Extension)')" />\r
-    <Copy SourceFiles="@(Derived32Sources)" DestinationFiles="@(Derived32Sources->'$(DSTROOT)\AppleInternal\Sources32\WebCore\%(RecursiveDir)%(Filename)%(Extension)')" />\r
-    <Copy SourceFiles="@(Derived64Sources)" DestinationFiles="@(Derived64Sources->'$(DSTROOT)\AppleInternal\Sources64\WebCore\%(RecursiveDir)%(Filename)%(Extension)')" />\r
   </Target>\r
 \r
 </Project>\r
index 2d5bc0a..53e4fe6 100644 (file)
@@ -1,3 +1,12 @@
+2015-09-25  Alex Christensen  <achristensen@webkit.org>
+
+        [Win] Switch to CMake
+        https://bugs.webkit.org/show_bug.cgi?id=148111
+
+        Reviewed by Brent Fulgham.
+
+        * WebKit.vcxproj/WebKit.proj:
+
 2015-09-24  Ryosuke Niwa  <rniwa@webkit.org>
 
         Ran sort-Xcode-project-file.
index e830f80..e8a8d9d 100644 (file)
@@ -3,19 +3,20 @@
 \r
   <!-- normalize configuration case -->\r
   <PropertyGroup Condition="'$(CONFIGURATION)'=='Release'">\r
-       <CONFIG>Production</CONFIG>\r
+       <CONFIG>Release</CONFIG>\r
     <DebugSuffix></DebugSuffix>\r
+    <DebugSuffixDefinition>-DDEBUG_SUFFIX=_debug</DebugSuffixDefinition>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(CONFIGURATION)'=='Debug'">\r
-       <CONFIG>DebugSuffix</CONFIG>\r
+       <CONFIG>Debug</CONFIG>\r
     <DebugSuffix>_debug</DebugSuffix>\r
+    <DebugSuffixDefinition>-DDEBUG_SUFFIX=_debug</DebugSuffixDefinition>\r
   </PropertyGroup>\r
 \r
   <!-- Wrapper to build WebKit for both win32 and x64. -->\r
   <PropertyGroup>\r
     <OFFICIAL_BUILD>1</OFFICIAL_BUILD>\r
     <WebKit_Libraries>$(SRCROOT)\AppleInternal</WebKit_Libraries>\r
-    <WebKit_OutputDir>$(OBJROOT)</WebKit_OutputDir>\r
     <AppleInternal>$(DSTROOT)\AppleInternal</AppleInternal>\r
     <AppleInternalLib32>$(AppleInternal)\lib32</AppleInternalLib32>\r
     <AppleInternalLib64>$(AppleInternal)\lib64</AppleInternalLib64>\r
     <ProgramFilesAAS64>Program Files\Common Files\Apple\Apple Application Support</ProgramFilesAAS64>\r
     <ConfigurationBuildDir>$(OBJROOT)\$(CONFIG)</ConfigurationBuildDir>  \r
     <OutputDirectory>$(DSTROOT)</OutputDirectory>\r
+       <CMakeCommandCommon>cmake $(SRCROOT)/WebKit -DPORT=AppleWin $(DebugSuffixDefinition) -DWEBKIT_LIBRARIES_DIR=$(WebKit_Libraries.Replace('\','/')) -DCMAKE_MODULE_PATH=$(SRCROOT.Replace('\','/'))/AppleInternal/tools/cmake -DCMAKE_BINARY_DIR=$(OBJROOT.Replace('\','/'))/$(CONFIG) -DWEBKIT_DIR=$(SRCROOT.Replace('\','/'))/WebKit</CMakeCommandCommon>\r
   </PropertyGroup>\r
-\r
-  <ItemGroup>\r
-    <WebKit Include="WebKit.submit.sln">\r
-      <AdditionalProperties>Platform=Win32;WEBKIT_OUTPUTDIR=$(WebKit_OutputDir);WEBKIT_LIBRARIES=$(WebKit_Libraries);OFFICIAL_BUILD=$(OFFICIAL_BUILD)</AdditionalProperties>\r
-    </WebKit>\r
-    <WebKit Include="WebKit.submit.sln">\r
-      <AdditionalProperties>Platform=x64;WEBKIT_OUTPUTDIR=$(WebKit_OutputDir);WEBKIT_LIBRARIES=$(WebKit_Libraries);OFFICIAL_BUILD=$(OFFICIAL_BUILD)</AdditionalProperties>\r
-    </WebKit>\r
-  </ItemGroup>\r
  \r
   <!-- Prepare for build -->\r
   <Target Name="PreBuild" BeforeTargets="Build">\r
     <Error Text="DSTROOT property or environment variable must be defined." Condition="'$(DSTROOT)' == ''" />\r
     <Error Text="OBJROOT property or environment variable must be defined." Condition="'$(OBJROOT)' == ''" />\r
+    <Error Text="Use /p:Configuration=Debug or /p:Configuration=Release" Condition="'$(CONFIG)' == ''" />\r
     <Message Text="Copying necessary headers to $(ConfigurationBuildDir)" />\r
-    <MakeDir Directories="$(DSTROOT);$(OBJROOT);$(ConfigurationBuildDir)\include\private" />\r
\r
+    <MakeDir Directories="$(DSTROOT);$(OBJROOT);$(OBJROOT)/$(CONFIG);$(ConfigurationBuildDir)\include\private;$(OBJROOT)/$(CONFIG)/build32;$(OBJROOT)/$(CONFIG)/build64" />\r
+\r
     <CreateItem Include="$(WebKit_Libraries)\include\private\**\*.*">\r
       <Output TaskParameter="Include" ItemName="PrivateIncFiles" />\r
     </CreateItem>\r
     <Message Text="Final output -> $(DSTROOT)" />\r
     <MakeDir Directories="$(AppleInternalLib32);$(AppleInternalLib64);$(AppleInternalBin32);$(AppleInternalBin64);$(AppleInternal32Symbols);$(AppleInternal64Symbols);$(AppleInternal)\include;$(DSTROOT)\$(ProgramFilesAAS32);$(DSTROOT)\$(ProgramFilesAAS64)" />\r
     <MakeDir Directories="$(DSTROOT)\$(ProgramFilesAAS32)\WebKit.resources;$(DSTROOT)\$(ProgramFilesAAS64)\WebKit.resources" />\r
-    <MakeDir Directories="$(DSTROOT)\AppleInternal\Sources32\WebKit;$(DSTROOT)\AppleInternal\Sources64\WebKit" />\r
   </Target>\r
 \r
   <!-- Build WebKit Software -->\r
   <Target Name="Build" AfterTargets="PreBuild">\r
     <Message Text="Building $(CONFIGURATION) Solution" />\r
     <Error Text="DSTROOT property or environment variable must be defined." Condition="'$(DSTROOT)' == ''" />\r
-    <Message Text="Output=$(WebKit_OutputDir)" />\r
-    <MSBuild Projects="@(WebKit)" Properties="Configuration=$(CONFIG)" Targets="ReBuild" />\r
+       <Exec Command="$(CMakeCommandCommon) -G &quot;Visual Studio 14 2015&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>\r
+       <Exec Command="msbuild Project.sln" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>\r
+       <Exec Command="$(CMakeCommandCommon) -G &quot;Visual Studio 14 2015 Win64&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>\r
+       <Exec Command="msbuild Project.sln" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>\r
   </Target>\r
 \r
   <Target Name="PostBuild" AfterTargets="Build">\r
     <Message Text="Moving $(CONFIG) build results to $(DSTROOT)" />\r
 \r
     <!-- Identify the files to copy over -->\r
-    <CreateItem Include="$(ConfigurationBuildDir)\include\**\*.*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\DerivedSources\ForwardingHeaders\WebKit\**\*.*">\r
       <Output TaskParameter="Include" ItemName="IncFiles" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin32\*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\bin32\*">\r
       <Output TaskParameter="Include" ItemName="Bin32Files" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin64\*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\bin64\*">\r
       <Output TaskParameter="Include" ItemName="Bin64Files" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin32\WebKit$(DebugSuffix).dll">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\bin32\WebKit$(DebugSuffix).dll">\r
       <Output TaskParameter="Include" ItemName="Bin32DLLFiles" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin64\WebKit$(DebugSuffix).dll">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\bin64\WebKit$(DebugSuffix).dll">\r
       <Output TaskParameter="Include" ItemName="Bin64DLLFiles" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin32\*.resources">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\bin32\*.resources">\r
       <Output TaskParameter="Include" ItemName="Bin32ResourceFolders" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin64\*.resources">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\bin64\*.resources">\r
       <Output TaskParameter="Include" ItemName="Bin64ResourceFolders" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin32\*.pdb">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\bin32\*.pdb">\r
       <Output TaskParameter="Include" ItemName="Bin32SymbolFiles" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin64\*.pdb">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\bin64\*.pdb">\r
       <Output TaskParameter="Include" ItemName="Bin64SymbolFiles" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin32\WebKit.resources\**\*.*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\bin32\WebKit.resources\**\*.*">\r
       <Output TaskParameter="Include" ItemName="Bin32Resources" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\bin64\WebKit.resources\**\*.*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\bin64\WebKit.resources\**\*.*">\r
       <Output TaskParameter="Include" ItemName="Bin64Resources" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\lib32\*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\lib32\*">\r
       <Output TaskParameter="Include" ItemName="Lib32Files" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\lib64\*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\lib64\*">\r
       <Output TaskParameter="Include" ItemName="Lib64Files" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\obj32\WebKit\DerivedSources\**\*.*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build64\obj32\WebKit\DerivedSources\**\*.*">\r
       <Output TaskParameter="Include" ItemName="Derived32Sources" />\r
     </CreateItem>\r
-    <CreateItem Include="$(ConfigurationBuildDir)\obj64\WebKit\DerivedSources\**\*.*">\r
+    <CreateItem Include="$(ConfigurationBuildDir)\build32\obj64\WebKit\DerivedSources\**\*.*">\r
       <Output TaskParameter="Include" ItemName="Derived64Sources" />\r
     </CreateItem>\r
 \r
-    <Copy SourceFiles="@(IncFiles)" DestinationFiles="@(IncFiles->'$(DSTROOT)\AppleInternal\include\%(RecursiveDir)%(Filename)%(Extension)')" />\r
+    <Copy SourceFiles="@(IncFiles)" DestinationFiles="@(IncFiles->'$(DSTROOT)\AppleInternal\include\WebKit\%(RecursiveDir)%(Filename)%(Extension)')" />\r
     <Copy SourceFiles="@(Lib32Files)" DestinationFolder="$(AppleInternalLib32)" />\r
     <Copy SourceFiles="@(Lib64Files)" DestinationFolder="$(AppleInternalLib64)" />\r
     <Copy SourceFiles="@(Bin32Files)" DestinationFolder="$(AppleInternalBin32)" />\r
     <Copy SourceFiles="@(Bin64ResourceFolders)" DestinationFolder="$(DSTROOT)\$(ProgramFilesAAS64)" />\r
     <Copy SourceFiles="@(Bin64SymbolFiles)" DestinationFolder="$(AppleInternal64Symbols)" />\r
     <Copy SourceFiles="@(Bin64Resources)" DestinationFiles="@(Bin64Resources->'$(DSTROOT)\$(ProgramFilesAAS64)\WebKit.resources\%(RecursiveDir)%(Filename)%(Extension)')" />\r
-    <Copy SourceFiles="@(Derived32Sources)" DestinationFiles="@(Derived32Sources->'$(DSTROOT)\AppleInternal\Sources32\WebKit\%(RecursiveDir)%(Filename)%(Extension)')" />\r
-    <Copy SourceFiles="@(Derived64Sources)" DestinationFiles="@(Derived64Sources->'$(DSTROOT)\AppleInternal\Sources64\WebKit\%(RecursiveDir)%(Filename)%(Extension)')" />\r
   </Target>\r
 \r
 </Project>\r
diff --git a/Source/cmake/WinTools.make b/Source/cmake/WinTools.make
new file mode 100644 (file)
index 0000000..7f55b37
--- /dev/null
@@ -0,0 +1,3 @@
+install:
+    xcopy "$(SRCROOT)\*.cmake" "$(DSTROOT)\AppleInternal\tools\cmake" /e/v/i/h/y
+    xcopy "$(SRCROOT)\tools\scripts\*" "$(DSTROOT)\AppleInternal\tools\scripts" /e/v/i/h/y
\ No newline at end of file
diff --git a/Source/cmake/tools/scripts/COPYRIGHT-END-YEAR b/Source/cmake/tools/scripts/COPYRIGHT-END-YEAR
new file mode 100644 (file)
index 0000000..9b3c236
--- /dev/null
@@ -0,0 +1 @@
+2015
diff --git a/Source/cmake/tools/scripts/VERSION b/Source/cmake/tools/scripts/VERSION
new file mode 100644 (file)
index 0000000..2d8c4cd
--- /dev/null
@@ -0,0 +1 @@
+534
diff --git a/Source/cmake/tools/scripts/auto-version.pl b/Source/cmake/tools/scripts/auto-version.pl
new file mode 100755 (executable)
index 0000000..a70cc86
--- /dev/null
@@ -0,0 +1,176 @@
+#!/usr/bin/perl -w
+
+use strict;
+use File::Path qw(make_path);
+use File::Spec;
+use File::Basename;
+use Cwd 'abs_path';
+use Win32;
+
+# Copyright (C) 2007, 2009, 2014 Apple Inc.  All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+
+sub splitVersion($);
+
+die "You must supply an output path as the argument.\n" if ($#ARGV < 0);
+
+my $thisDirectory;
+my $WEBKIT_LIBRARIES = $ENV{'WEBKIT_LIBRARIES'};
+if (defined $WEBKIT_LIBRARIES) {
+    $thisDirectory = File::Spec->catfile($WEBKIT_LIBRARIES, 'tools', 'scripts');
+} else {
+    $thisDirectory = dirname(abs_path($0));
+}
+
+my $FALLBACK_VERSION_PATH = File::Spec->catfile($thisDirectory, 'VERSION');
+open(FALLBACK_VERSION_FILE, '<', $FALLBACK_VERSION_PATH) or die "Unable to open $FALLBACK_VERSION_PATH: $!";
+my $FALLBACK_VERSION = <FALLBACK_VERSION_FILE>;
+close FALLBACK_VERSION_FILE;
+chomp($FALLBACK_VERSION);
+
+my $COPYRIGHT_END_YEAR_PATH = File::Spec->catfile($thisDirectory, 'COPYRIGHT-END-YEAR');
+open(COPYRIGHT_END_YEAR_FILE, '<', $COPYRIGHT_END_YEAR_PATH) or die "Unable to open $COPYRIGHT_END_YEAR_PATH: $!";
+my $COPYRIGHT_END_YEAR = <COPYRIGHT_END_YEAR_FILE>;
+close COPYRIGHT_END_YEAR_FILE;
+chomp($COPYRIGHT_END_YEAR);
+
+# Make sure we don't have any leading or trailing quote
+$ARGV[0] =~ s/^\"//;
+$ARGV[0] =~ s/\"$//;
+
+my $OUTPUT_DIR = File::Spec->catdir(File::Spec->canonpath($ARGV[0]), 'include');
+unless (-d $OUTPUT_DIR) {
+    make_path($OUTPUT_DIR) or die "Couldn't create $OUTPUT_DIR: $!";
+}
+
+my $OUTPUT_FILE = File::Spec->catfile($OUTPUT_DIR, 'autoversion.h');
+
+# Take the initial version number from RC_ProjectSourceVersion if it
+# exists, otherwise fall back to the version number stored in the source.
+my $ENVIRONMENT_VERSION = $ENV{'RC_ProjectSourceVersion'} || $ENV{'RC_PROJECTSOURCEVERSION'};
+my $PROPOSED_VERSION = $ENVIRONMENT_VERSION || $FALLBACK_VERSION;
+chomp($PROPOSED_VERSION);
+
+my ($BUILD_MAJOR_VERSION, $BUILD_MINOR_VERSION, $BUILD_TINY_VERSION, $BUILD_VARIANT_VERSION, $ADJUSTED_PROPOSED_VERSION, $FULL_BUILD_MAJOR_VERSION) = splitVersion($PROPOSED_VERSION);
+
+my $TINY_VERSION = $BUILD_TINY_VERSION;
+my $VERSION_TEXT = $ADJUSTED_PROPOSED_VERSION;
+my $VERSION_TEXT_SHORT = $VERSION_TEXT;
+
+my $SVN_REVISION = '';
+if (!$ENVIRONMENT_VERSION) {
+    # If we didn't pull the version number from the environment then we're doing
+    # an engineering build and we'll stamp the build with some more information.
+
+    my $BUILD_DATE = localtime(time);
+    my $SVN_REVISION = `svn info`;
+    $SVN_REVISION =~ m/Revision: (\d+)/;
+    $SVN_REVISION= $1;
+
+    chomp($BUILD_DATE);
+    chomp($SVN_REVISION);
+
+    $VERSION_TEXT_SHORT .= "+";
+    my $USER = Win32::LoginName;
+    $VERSION_TEXT = "$VERSION_TEXT_SHORT $USER - $BUILD_DATE - r$SVN_REVISION";
+}
+
+open(OUTPUT_FILE, '>', $OUTPUT_FILE) or die "Couldn't open $OUTPUT_FILE: $!";
+print OUTPUT_FILE <<EOF;
+#define __VERSION_TEXT__ "$VERSION_TEXT"
+#define __BUILD_NUMBER__ "$VERSION_TEXT"
+#define __BUILD_NUMBER_SHORT__ "$VERSION_TEXT_SHORT"
+#define __VERSION_MAJOR__ $BUILD_MAJOR_VERSION
+#define __VERSION_MINOR__ $BUILD_MINOR_VERSION
+#define __VERSION_TINY__ $BUILD_TINY_VERSION
+#define __VERSION_BUILD__ $BUILD_VARIANT_VERSION
+#define __BUILD_NUMBER_MAJOR__ $BUILD_MAJOR_VERSION
+#define __BUILD_NUMBER_MINOR__ $BUILD_MINOR_VERSION
+#define __BUILD_NUMBER_VARIANT__ $BUILD_TINY_VERSION
+#define __SVN_REVISION__ $SVN_REVISION
+#define __FULL_BUILD_MAJOR_VERSION__  $FULL_BUILD_MAJOR_VERSION
+EOF
+
+if (defined $COPYRIGHT_END_YEAR) {
+    print OUTPUT_FILE "#define __COPYRIGHT_YEAR_END_TEXT__ \"$COPYRIGHT_END_YEAR\"\n";
+}
+close(OUTPUT_FILE);
+
+sub packTwoValues($$)
+{
+    my $first = shift;
+    my $second = shift;
+
+    die "First version component ($first) is too large. Must be between 0 and 99" if ($first > 99);
+    die "Second version component ($second) is too large. Must be between 0 and 999" if ($second > 999);
+
+    return $first * 1000 + $second;
+}
+
+sub splitVersion($)
+{
+    my $PROPOSED_VERSION = shift;
+
+    $PROPOSED_VERSION =~ s/^\s+//g; # Get rid of any leading whitespace
+    $PROPOSED_VERSION =~ s/\s+$//g; # Get rid of any trailing whitespace
+
+    # Split out the components of the dotted version number.
+    my @components = split(/\./, $PROPOSED_VERSION) or die "Couldn't parse $PROPOSED_VERSION";
+    my $componentCount = scalar(@components);
+
+    my $BUILD_MAJOR_VERSION = $components[0];
+
+    # Have the minor and tiny components default to zero if not present.
+    my $BUILD_MINOR_VERSION = 0;
+    my $BUILD_TINY_VERSION = 0;
+    my $BUILD_MICRO_VERSION = 0;
+    my $BUILD_NANO_VERSION = 0;
+    if ($componentCount > 1) {
+        $BUILD_MINOR_VERSION = $components[1];
+    }
+    if ($componentCount > 2) {
+        $BUILD_TINY_VERSION = $components[2];
+    }
+    if ($componentCount > 3) {
+        $BUILD_MICRO_VERSION = $components[3];
+    }
+
+    my $RETURN_NANO_VERSION = $ENV{'RC_ProjectBuildVersion'} || $ENV{'RC_PROJECTBUILDVERSION'} || $BUILD_MICRO_VERSION;
+    if ($componentCount > 4) {
+        $BUILD_NANO_VERSION = $components[4];
+        $RETURN_NANO_VERSION = $BUILD_NANO_VERSION;
+    }
+
+    # Cut the major component down to three characters by dropping any
+    # extra leading digits, then adjust the major version portion of the
+    # version string to match.
+    my $originalLength = length($BUILD_MAJOR_VERSION);
+    my $FULL_BUILD_MAJOR_VERSION = $BUILD_MAJOR_VERSION;
+    $BUILD_MAJOR_VERSION =~ s/^.*(\d\d\d)$/$1/;
+
+    my $charactersToRemove = $originalLength - length($BUILD_MAJOR_VERSION);
+
+    $PROPOSED_VERSION = substr($PROPOSED_VERSION, $charactersToRemove);
+
+    return ($BUILD_MAJOR_VERSION, packTwoValues($BUILD_MINOR_VERSION, $BUILD_TINY_VERSION), packTwoValues($BUILD_MICRO_VERSION, $BUILD_NANO_VERSION), $RETURN_NANO_VERSION, $PROPOSED_VERSION, $FULL_BUILD_MAJOR_VERSION);
+}
diff --git a/Source/cmake/tools/scripts/feature-defines.pl b/Source/cmake/tools/scripts/feature-defines.pl
new file mode 100755 (executable)
index 0000000..71c0b56
--- /dev/null
@@ -0,0 +1,47 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2013-2014 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+# 
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+use strict;
+use File::Spec;
+
+my $FeatureDefines = ($ARGV[1] eq 'cairo')  ? 'FeatureDefinesCairo.props' : 'FeatureDefines.props';
+my $FeatureDefinesFile = File::Spec->catfile($ARGV[0], 'tools', 'vsprops', $FeatureDefines);
+
+open(FEATURE_DEFINES, '<', $FeatureDefinesFile) or die "Unable to open $FeatureDefinesFile: $!";
+my @lines = <FEATURE_DEFINES>;
+close(FEATURE_DEFINES);
+
+my @enabled = grep(/<ENABLE_/, @lines);
+@enabled = grep(!/\/>/, @enabled);
+for (@enabled) {
+    s/<\/.*>//;
+    s/<.*>//;
+    s/^\s+//;
+    s/\s+$//;
+    chomp();
+}
+
+my $result = join(' ', @enabled);
+
+print "$result\n";
diff --git a/Source/cmake/tools/scripts/version-stamp.pl b/Source/cmake/tools/scripts/version-stamp.pl
new file mode 100644 (file)
index 0000000..7e023c5
--- /dev/null
@@ -0,0 +1,126 @@
+#!/usr/bin/perl -w
+
+use strict;
+use File::Spec;
+use POSIX;
+
+# Copyright (C) 2007, 2009, 2014 Apple Inc.  All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+sub exitStatus($);
+
+my $WEBKIT_LIBRARIES = $ENV{'WEBKIT_LIBRARIES'};
+
+my $VERSION_STAMPER = File::Spec->catfile($WEBKIT_LIBRARIES, 'tools', 'VersionStamper', 'VersionStamper.exe');
+
+unless (-e $VERSION_STAMPER) {
+    print "No $VERSION_STAMPER executable. Exiting.\n";
+    exit(0);
+}
+
+my ($intdir, $target);
+if (scalar(@ARGV) > 1) {
+    $intdir = $ARGV[0];
+    $target = $ARGV[1];
+} else {
+    my @arguments = split(/\s+/, $ARGV[0]) or die "Couldn't parse $ARGV[0]";
+    die "You must supply the build output directory and the target to be stamped with version information.\n" if (scalar(@arguments) < 2);
+    $intdir = $arguments[0];
+    $target = $arguments[1];
+}
+
+# Make sure we don't have any leading or trailing quote characters.
+$intdir =~ s/^\"//;
+$intdir =~ s/\"$//;
+
+$target =~ s/^\"//;
+$target =~ s/\"$//;
+
+my %components =
+(
+    '__VERSION_TEXT__' => undef,
+    '__VERSION_MAJOR__' => undef,
+    '__VERSION_MINOR__' => undef,
+    '__VERSION_TINY__' => undef,
+    '__VERSION_BUILD__' => undef,
+    '__FULL_BUILD_MAJOR_VERSION__' => undef,
+);
+
+my $VERSION_FILE = File::Spec->catfile(File::Spec->canonpath($intdir), 'include', 'autoversion.h');
+
+open(VERSION_INFO, '<', $VERSION_FILE) or die "Unable to open $VERSION_FILE: $!\n";
+while (my $line = <VERSION_INFO>) {
+    foreach my $componentKey (keys %components) {
+        if ($line !~ m/$componentKey/) {
+            next;
+        }
+
+        $line =~ s/#define $componentKey//;
+        $line =~ s/^\s*(.*)\s*$/$1/;
+        $line =~ s/^"(.*)"$/$1/;
+        chomp($line);
+
+        $components{$componentKey} = $line;
+    }
+}
+close(VERSION_INFO);
+
+print "Processing version $components{'__VERSION_TEXT__'} for $target\n";
+
+my $TARGET_PATH = File::Spec->canonpath($target);
+
+print "Adjusting RC_PROJECTSOURCEVERSION and RC_ProjectSourceVersion to be safe for VersionStamper.\n";
+
+my $SAFE_PROJECT_VERSION = "$components{'__FULL_BUILD_MAJOR_VERSION__'}.$components{'__VERSION_MINOR__'}.$components{'__VERSION_TINY__'}";
+my $SAFE_BUILD_VERSION = $ENV{RC_ProjectBuildVersion} || $ENV{RC_PROJECTBUILDVERSION} || $components{'__VERSION_BUILD__'};
+
+print "Using RC_PROJECTSOURCEVERSION=$SAFE_PROJECT_VERSION and RC_PROJECTBUILDVERSION=$SAFE_BUILD_VERSION\n";
+
+# Note: These environment settings only affect this script and its child processes:
+$ENV{RC_PROJECTSOURCEVERSION} = $SAFE_PROJECT_VERSION;
+$ENV{RC_ProjectSourceVersion} = $SAFE_PROJECT_VERSION;
+
+my $rc = system($VERSION_STAMPER, '--verbose', $TARGET_PATH, '--fileMajor', $components{'__FULL_BUILD_MAJOR_VERSION__'},
+    '--fileMinor', $components{'__VERSION_MINOR__'}, '--fileRevision', $components{'__VERSION_TINY__'},
+    '--fileBuild', $SAFE_BUILD_VERSION, '--productMajor', $components{'__FULL_BUILD_MAJOR_VERSION__'},
+    '--productMinor', $components{'__VERSION_MINOR__'}, '--productRevision', $components{'__VERSION_TINY__'},
+    '--productBuild', $components{'__VERSION_BUILD__'}); 
+
+exit(exitStatus($rc));
+
+# This method is for portability. Return the system-appropriate exit
+# status of a child process.
+#
+# Args: pass the child error status returned by the last pipe close,
+#       for example "$?".
+sub exitStatus($)
+{
+    my ($returnvalue) = @_;
+    if ($^O eq "MSWin32") {
+        return $returnvalue >> 8;
+    }
+    if (!WIFEXITED($returnvalue)) {
+        return 254;
+    }
+    return WEXITSTATUS($returnvalue);
+}