1207b01a49c0749bf9e673fee5fcbc5b41a52d1c
[WebKit-https.git] / Source / JavaScriptCore / JavaScriptCore.vcxproj / JavaScriptCore.proj
1 <?xml version="1.0" encoding="utf-8"?>\r
2 <Project InitialTargets="PreBuild" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
3 \r
4   <!-- normalize configuration case -->\r
5   <PropertyGroup Condition="'$(CONFIGURATION)'=='Release'">\r
6         <CONFIG>Production</CONFIG>\r
7   </PropertyGroup>\r
8   <PropertyGroup Condition="'$(CONFIGURATION)'=='Debug'">\r
9         <CONFIG>DebugSuffix</CONFIG>\r
10   </PropertyGroup>\r
11 \r
12   <!-- Wrapper to build JavaScriptCore for both win32 and x64. -->\r
13   <PropertyGroup>\r
14     <OFFICIAL_BUILD>1</OFFICIAL_BUILD>\r
15     <WebKit_Libraries>$(SRCROOT)\AppleInternal\</WebKit_Libraries>\r
16     <WebKit_OutputDir>$(OBJROOT)</WebKit_OutputDir>\r
17     <AppleInternal>$(DSTROOT)\AppleInternal</AppleInternal>\r
18     <AppleInternalLib32>$(AppleInternal)\lib32</AppleInternalLib32>\r
19     <AppleInternalLib64>$(AppleInternal)\lib64</AppleInternalLib64>\r
20     <AppleInternalBin32>$(AppleInternal)\bin32</AppleInternalBin32>\r
21     <AppleInternalBin64>$(AppleInternal)\bin64</AppleInternalBin64>\r
22     <AppleInternal32Symbols>$(AppleInternal)\public32\sym</AppleInternal32Symbols>\r
23     <AppleInternal64Symbols>$(AppleInternal)\public64\sym</AppleInternal64Symbols>\r
24     <ProgramFilesAAS32>Program Files (x86)\Common Files\Apple\Apple Application Support\</ProgramFilesAAS32>\r
25     <ProgramFilesAAS64>Program Files\Common Files\Apple\Apple Application Support\</ProgramFilesAAS64>\r
26     <ConfigurationBuildDir>$(OBJROOT)\$(CONFIG)</ConfigurationBuildDir>  \r
27     <OutputDirectory>$(DSTROOT)</OutputDirectory>\r
28   </PropertyGroup>\r
29 \r
30   <ItemGroup>\r
31     <JavaScriptCore Include="JavaScriptCore.submit.sln">\r
32       <AdditionalProperties>Platform=Win32;WEBKIT_OUTPUTDIR=$(WebKit_OutputDir);WEBKIT_LIBRARIES=$(WebKit_Libraries);OFFICIAL_BUILD=$(OFFICIAL_BUILD)</AdditionalProperties>\r
33     </JavaScriptCore>\r
34     <JavaScriptCore Include="JavaScriptCore.submit.sln">\r
35       <AdditionalProperties>Platform=x64;WEBKIT_OUTPUTDIR=$(WebKit_OutputDir);WEBKIT_LIBRARIES=$(WebKit_Libraries);OFFICIAL_BUILD=$(OFFICIAL_BUILD)</AdditionalProperties>\r
36     </JavaScriptCore>\r
37   </ItemGroup>\r
38  \r
39   <!-- Prepare for build -->\r
40   <Target Name="PreBuild" BeforeTargets="Build">\r
41     <Error Text="DSTROOT property or environment variable must be defined." Condition="'$(DSTROOT)' == ''" />\r
42     <Error Text="OBJROOT property or environment variable must be defined." Condition="'$(OBJROOT)' == ''" />\r
43     <Message Text="Copying necessary headers to $(ConfigurationBuildDir)" />\r
44     <MakeDir Directories="$(DSTROOT);$(OBJROOT);$(ConfigurationBuildDir)\include\private" />\r
45  \r
46     <CreateItem Include="$(WebKit_Libraries)\include\private\**\*.*">\r
47       <Output TaskParameter="Include" ItemName="PrivateIncFiles" />\r
48     </CreateItem>\r
49 \r
50     <Copy SourceFiles="@(PrivateIncFiles)" DestinationFiles="@(PrivateIncFiles->'$(ConfigurationBuildDir)\include\private\%(RecursiveDir)%(Filename)%(Extension)')" />\r
51     <Message Text="Build output -> $(OBJROOT)" />\r
52     <Message Text="Final output -> $(DSTROOT)" />\r
53     <MakeDir Directories="$(AppleInternalLib32);$(AppleInternalLib64);$(AppleInternalBin32);$(AppleInternalBin64);$(AppleInternal32Symbols);$(AppleInternal64Symbols);$(AppleInternal)\include;$(DSTROOT)\$(ProgramFilesAAS32);$(DSTROOT)\$(ProgramFilesAAS64)" />\r
54     <MakeDir Directories="$(DSTROOT)\$(ProgramFilesAAS32)\JavaScriptCore.resources;$(DSTROOT)\$(ProgramFilesAAS64)\JavaScriptCore.resources" />\r
55     <MakeDir Directories="$(DSTROOT)\AppleInternal\Sources32\JavaScriptCore;$(DSTROOT)\AppleInternal\Sources64\JavaScriptCore" />\r
56   </Target>\r
57 \r
58   <!-- Build JavaScriptCore Software -->\r
59   <Target Name="Build" AfterTargets="PreBuild">\r
60     <Message Text="Building $(CONFIGURATION) Solution" />\r
61     <Error Text="DSTROOT property or environment variable must be defined." Condition="'$(DSTROOT)' == ''" />\r
62     <Message Text="Output=$(WebKit_OutputDir)" />\r
63     <MSBuild Projects="@(JavaScriptCore)" Properties="Configuration=$(CONFIG)" Targets="ReBuild" />\r
64   </Target>\r
65 \r
66   <Target Name="PostBuild" AfterTargets="Build">\r
67     <Error Text="DSTROOT property or environment variable must be defined." Condition="'$(DSTROOT)' == ''" />\r
68     <Message Text="Moving $(CONFIG) build results to $(DSTROOT)" />\r
69 \r
70     <!-- Identify the files to copy over -->\r
71     <CreateItem Include="$(ConfigurationBuildDir)\include\**\*.*">\r
72       <Output TaskParameter="Include" ItemName="IncFiles" />\r
73     </CreateItem>\r
74     <CreateItem Include="$(ConfigurationBuildDir)\bin32\*">\r
75       <Output TaskParameter="Include" ItemName="Bin32Files" />\r
76     </CreateItem>\r
77     <CreateItem Include="$(ConfigurationBuildDir)\bin64\*">\r
78       <Output TaskParameter="Include" ItemName="Bin64Files" />\r
79     </CreateItem>\r
80     <CreateItem Include="$(ConfigurationBuildDir)\bin32\*.pdb">\r
81       <Output TaskParameter="Include" ItemName="Bin32SymbolFiles" />\r
82     </CreateItem>\r
83     <CreateItem Include="$(ConfigurationBuildDir)\bin64\*.pdb">\r
84       <Output TaskParameter="Include" ItemName="Bin64SymbolFiles" />\r
85     </CreateItem>\r
86     <CreateItem Include="$(ConfigurationBuildDir)\bin32\JavaScriptCore.resources\**\*.*">\r
87       <Output TaskParameter="Include" ItemName="Bin32Resources" />\r
88     </CreateItem>\r
89     <CreateItem Include="$(ConfigurationBuildDir)\bin64\JavaScriptCore.resources\**\*.*">\r
90       <Output TaskParameter="Include" ItemName="Bin64Resources" />\r
91     </CreateItem>\r
92     <CreateItem Include="$(ConfigurationBuildDir)\lib32\*">\r
93       <Output TaskParameter="Include" ItemName="Lib32Files" />\r
94     </CreateItem>\r
95     <CreateItem Include="$(ConfigurationBuildDir)\lib64\*">\r
96       <Output TaskParameter="Include" ItemName="Lib64Files" />\r
97     </CreateItem>\r
98     <CreateItem Include="$(ConfigurationBuildDir)\obj32\JavaScriptCore\DerivedSources\**\*.*">\r
99       <Output TaskParameter="Include" ItemName="Derived32Sources" />\r
100     </CreateItem>\r
101     <CreateItem Include="$(ConfigurationBuildDir)\obj64\JavaScriptCore\DerivedSources\**\*.*">\r
102       <Output TaskParameter="Include" ItemName="Derived64Sources" />\r
103     </CreateItem>\r
104 \r
105     <Copy SourceFiles="@(IncFiles)" DestinationFiles="@(IncFiles->'$(DSTROOT)\AppleInternal\include\%(RecursiveDir)%(Filename)%(Extension)')" />\r
106     <Copy SourceFiles="@(Lib32Files)" DestinationFolder="$(AppleInternalLib32)" />\r
107     <Copy SourceFiles="@(Lib64Files)" DestinationFolder="$(AppleInternalLib64)" />\r
108     <Copy SourceFiles="@(Bin32Files)" DestinationFolder="$(AppleInternalBin32)" />\r
109     <Copy SourceFiles="@(Bin32Files)" DestinationFolder="$(DSTROOT)\$(ProgramFilesAAS32)" />\r
110     <Copy SourceFiles="@(Bin32SymbolFiles)" DestinationFolder="$(AppleInternal32Symbols)" />\r
111     <Copy SourceFiles="@(Bin32Resources)" DestinationFiles="@(Bin32Resources->'$(DSTROOT)\$(ProgramFilesAAS32)\JavaScriptCore.resources\%(RecursiveDir)%(Filename)%(Extension)')" />\r
112     <Copy SourceFiles="@(Bin64Files)" DestinationFolder="$(AppleInternalBin64)" />\r
113     <Copy SourceFiles="@(Bin64Files)" DestinationFolder="$(DSTROOT)\$(ProgramFilesAAS64)" />\r
114     <Copy SourceFiles="@(Bin64SymbolFiles)" DestinationFolder="$(AppleInternal64Symbols)" />\r
115     <Copy SourceFiles="@(Bin64Resources)" DestinationFiles="@(Bin64Resources->'$(DSTROOT)\$(ProgramFilesAAS64)\JavaScriptCore.resources\%(RecursiveDir)%(Filename)%(Extension)')" />\r
116     <Copy SourceFiles="@(Derived32Sources)" DestinationFiles="@(Derived32Sources->'$(DSTROOT)\AppleInternal\Sources32\JavaScriptCore\%(RecursiveDir)%(Filename)%(Extension)')" />\r
117     <Copy SourceFiles="@(Derived64Sources)" DestinationFiles="@(Derived64Sources->'$(DSTROOT)\AppleInternal\Sources64\JavaScriptCore\%(RecursiveDir)%(Filename)%(Extension)')" />\r
118   </Target>\r
119 \r
120 </Project>\r
121 \r