[Win] CMake build type is not set.
[WebKit-https.git] / Source / WTF / WTF.vcxproj / WTF.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>Release</CONFIG>\r
7     <DebugSuffix></DebugSuffix>\r
8     <DebugSuffixDefinition></DebugSuffixDefinition>\r
9   </PropertyGroup>\r
10   <PropertyGroup Condition="'$(CONFIGURATION)'=='Debug'">\r
11         <CONFIG>Debug</CONFIG>\r
12     <DebugSuffix>_debug</DebugSuffix>\r
13     <DebugSuffixDefinition>-DDEBUG_SUFFIX=_debug</DebugSuffixDefinition>\r
14   </PropertyGroup>\r
15 \r
16   <!-- Wrapper to build WTF for both win32 and x64. -->\r
17   <PropertyGroup>\r
18     <OFFICIAL_BUILD>1</OFFICIAL_BUILD>\r
19     <WebKit_Libraries>$(SRCROOT)\AppleInternal</WebKit_Libraries>\r
20     <AppleInternal>$(DSTROOT)\AppleInternal</AppleInternal>\r
21     <AppleInternalLib32>$(AppleInternal)\lib32</AppleInternalLib32>\r
22     <AppleInternalLib64>$(AppleInternal)\lib64</AppleInternalLib64>\r
23     <AppleInternalBin32>$(AppleInternal)\bin32</AppleInternalBin32>\r
24     <AppleInternalBin64>$(AppleInternal)\bin64</AppleInternalBin64>\r
25     <AppleInternal32Symbols>$(AppleInternal)\public32\sym</AppleInternal32Symbols>\r
26     <AppleInternal64Symbols>$(AppleInternal)\public64\sym</AppleInternal64Symbols>\r
27     <ProgramFilesAAS32>Program Files (x86)\Common Files\Apple\Apple Application Support</ProgramFilesAAS32>\r
28     <ProgramFilesAAS64>Program Files\Common Files\Apple\Apple Application Support</ProgramFilesAAS64>\r
29     <ConfigurationBuildDir>$(OBJROOT)\$(CONFIG)</ConfigurationBuildDir>\r
30     <OutputDirectory>$(DSTROOT)</OutputDirectory>\r
31         <CMakeCommandCommon>cmake $(SRCROOT) -DPORT=AppleWin $(DebugSuffixDefinition) -DWEBKIT_LIBRARIES_DIR=$(WebKit_Libraries.Replace('\','/')) -DCMAKE_MODULE_PATH=$(SRCROOT.Replace('\','/'))/AppleInternal/tools/cmake -DCMAKE_BINARY_DIR=$(OBJROOT.Replace('\','/'))/$(CONFIG) -DCMAKE_BUILD_TYPE=$(CONFIGURATION) -DWTF_DIR=$(SRCROOT.Replace('\','/'))</CMakeCommandCommon>\r
32   </PropertyGroup>\r
33 \r
34   <!-- Prepare for build -->\r
35   <Target Name="PreBuild" BeforeTargets="Build">\r
36     <Error Text="DSTROOT property or environment variable must be defined." Condition="'$(DSTROOT)' == ''" />\r
37     <Error Text="OBJROOT property or environment variable must be defined." Condition="'$(OBJROOT)' == ''" />\r
38     <Error Text="Use /p:Configuration=Debug or /p:Configuration=Release" Condition="'$(CONFIG)' == ''" />\r
39     <MakeDir Directories="$(DSTROOT);$(OBJROOT);$(OBJROOT)/$(CONFIG);$(OBJROOT)/$(CONFIG)/build32;$(OBJROOT)/$(CONFIG)/build64" />\r
40     <Message Text="Build output -> $(OBJROOT)" />\r
41     <Message Text="Final output -> $(DSTROOT)" />\r
42     <MakeDir Directories="$(AppleInternalLib32);$(AppleInternalLib64);$(AppleInternalBin32);$(AppleInternalBin64);$(AppleInternal32Symbols);$(AppleInternal64Symbols);$(AppleInternal)\include;$(DSTROOT)\$(ProgramFilesAAS32);$(DSTROOT)\$(ProgramFilesAAS64)" />\r
43   </Target>\r
44 \r
45   <!-- Build WTF Software -->\r
46   <Target Name="Build" AfterTargets="PreBuild">\r
47     <Message Text="Building $(CONFIGURATION) Solution" />\r
48     <Error Text="DSTROOT property or environment variable must be defined." Condition="'$(DSTROOT)' == ''" />\r
49         <Exec Command="$(CMakeCommandCommon) -G &quot;Visual Studio 14 2015&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>\r
50         <Exec Command="msbuild Project.sln /p:Configuration=$(CONFIG)" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build32"/>\r
51         <Exec Command="$(CMakeCommandCommon) -G &quot;Visual Studio 14 2015 Win64&quot;" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>\r
52         <Exec Command="msbuild Project.sln /p:Configuration=$(CONFIG)" WorkingDirectory="$(OBJROOT)/$(CONFIG)/build64"/>\r
53   </Target>\r
54 \r
55   <Target Name="PostBuild" AfterTargets="Build">\r
56     <Error Text="DSTROOT property or environment variable must be defined." Condition="'$(DSTROOT)' == ''" />\r
57     <Message Text="Moving $(CONFIG) build results to $(DSTROOT)" />\r
58  \r
59     <!-- Identify the files to copy over -->\r
60     <CreateItem Include="$(ConfigurationBuildDir)\build32\DerivedSources\ForwardingHeaders\WTF\**\*.*">\r
61       <Output TaskParameter="Include" ItemName="IncFiles" />\r
62     </CreateItem>\r
63     <CreateItem Include="$(ConfigurationBuildDir)\build32\bin32\*">\r
64        <Output TaskParameter="Include" ItemName="Bin32Files" />\r
65     </CreateItem>\r
66     <CreateItem Include="$(ConfigurationBuildDir)\build64\bin64\*">\r
67        <Output TaskParameter="Include" ItemName="Bin64Files" />\r
68     </CreateItem>\r
69     <CreateItem Include="$(ConfigurationBuildDir)\build32\bin32\WTF$(DebugSuffix).dll">\r
70       <Output TaskParameter="Include" ItemName="Bin32DLLFiles" />\r
71     </CreateItem>\r
72     <CreateItem Include="$(ConfigurationBuildDir)\build64\bin64\WTF$(DebugSuffix).dll">\r
73       <Output TaskParameter="Include" ItemName="Bin64DLLFiles" />\r
74     </CreateItem>\r
75     <CreateItem Include="$(ConfigurationBuildDir)\build32\bin32\*.pdb">\r
76        <Output TaskParameter="Include" ItemName="Bin32SymbolFiles" />\r
77     </CreateItem>\r
78     <CreateItem Include="$(ConfigurationBuildDir)\build64\bin64\*.pdb">\r
79        <Output TaskParameter="Include" ItemName="Bin64SymbolFiles" />\r
80     </CreateItem>\r
81     <CreateItem Include="$(ConfigurationBuildDir)\build32\lib32\*">\r
82        <Output TaskParameter="Include" ItemName="Lib32Files" />\r
83     </CreateItem>\r
84     <CreateItem Include="$(ConfigurationBuildDir)\build64\lib64\*">\r
85        <Output TaskParameter="Include" ItemName="Lib64Files" />\r
86     </CreateItem>\r
87  \r
88     <Copy SourceFiles="@(IncFiles)" DestinationFiles="@(IncFiles->'$(DSTROOT)\AppleInternal\include\private\wtf\%(RecursiveDir)%(Filename)%(Extension)')" />\r
89     <Copy SourceFiles="@(Lib32Files)" DestinationFolder="$(AppleInternalLib32)" />\r
90     <Copy SourceFiles="@(Lib64Files)" DestinationFolder="$(AppleInternalLib64)" />\r
91     <Copy SourceFiles="@(Bin32Files)" DestinationFolder="$(AppleInternalBin32)" />\r
92     <Copy SourceFiles="@(Bin32DLLFiles)" DestinationFolder="$(DSTROOT)\$(ProgramFilesAAS32)" />\r
93     <Copy SourceFiles="@(Bin32SymbolFiles)" DestinationFolder="$(AppleInternal32Symbols)" />\r
94     <Copy SourceFiles="@(Bin64Files)" DestinationFolder="$(AppleInternalBin64)" />\r
95     <Copy SourceFiles="@(Bin64DLLFiles)" DestinationFolder="$(DSTROOT)\$(ProgramFilesAAS64)" />\r
96     <Copy SourceFiles="@(Bin64SymbolFiles)" DestinationFolder="$(AppleInternal64Symbols)" />\r
97   </Target>\r
98 \r
99 </Project>\r