Source/JavaScriptCore: [Win] Pass environment to Pre-Build, Pre-link, and Post-Build...
[WebKit-https.git] / WebKitLibraries / win / tools / vsprops / common.props
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3   <PropertyGroup Label="UserMacros">
4     <CONFIGURATIONBUILDDIR>$(WEBKIT_OUTPUTDIR)\$(Configuration)</CONFIGURATIONBUILDDIR>
5     <DEBUGSUFFIX>
6     </DEBUGSUFFIX>
7   </PropertyGroup>
8   <PropertyGroup>
9     <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
10     <OutDir>$(ConfigurationBuildDir)\bin$(PlatformArchitecture)\</OutDir>
11     <IntDir>$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\</IntDir>
12     <LinkIncremental>false</LinkIncremental>
13     <NMakeBuildCommandLine>%SystemDrive%\cygwin\bin\which.exe bash
14 if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
15 set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir)
16 set PLATFORMARCHITECTURE=$(PlatformArchitecture)
17 set WEBKIT_LIBRARIES=$(WEBKIT_LIBRARIES)
18 nmake /nologo -f $(ProjectName).make</NMakeBuildCommandLine>
19     <NMakeReBuildCommandLine>%SystemDrive%\cygwin\bin\which.exe bash
20 if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
21 set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir)
22 set PLATFORMARCHITECTURE=$(PlatformArchitecture)
23 set WEBKIT_LIBRARIES=$(WEBKIT_LIBRARIES)
24 nmake /nologo -f $(ProjectName).make clean
25 nmake /nologo -f $(ProjectName).make</NMakeReBuildCommandLine>
26     <NMakeCleanCommandLine>%SystemDrive%\cygwin\bin\which.exe bash
27 if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
28
29 set PATH=$(VSInstallDir)\VC\bin;%PATH%
30
31 REM VS2010 has a known bug where the clean command does not recognize environment variables properly unless explicitly set here
32 set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir)
33 set PLATFORMARCHITECTURE=$(PlatformArchitecture)
34 set WEBKIT_LIBRARIES=$(WEBKIT_LIBRARIES)
35 nmake /nologo -f $(ProjectName).make clean</NMakeCleanCommandLine>
36     <TargetName>$(ProjectName)$(DebugSuffix)</TargetName>
37   </PropertyGroup>
38   <ItemDefinitionGroup>
39     <ClCompile>
40       <AdditionalOptions>/bigobj /GS %(AdditionalOptions)</AdditionalOptions>
41       <PreprocessorDefinitions>_WINDOWS;WINVER=0x502;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_HAS_EXCEPTIONS=0;BUILDING_$(ProjectName);NOMINMAX;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
42       <PreprocessorDefinitions Condition="$(Platform)=='Win32'">WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
43       <PreprocessorDefinitions Condition="$(Platform)=='Win64'">x64</PreprocessorDefinitions>
44       <ExceptionHandling>false</ExceptionHandling>
45       <RuntimeTypeInfo>false</RuntimeTypeInfo>
46       <WarningLevel>Level4</WarningLevel>
47       <TreatWarningAsError>false</TreatWarningAsError>
48       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
49       <DisableSpecificWarnings>4018;4068;4099;4100;4127;4138;4146;4180;4189;4201;4244;4251;4267;4275;4288;4291;4305;4309;4344;4355;4389;4396;4481;4503;4505;4510;4512;4530;4610;4702;4706;4800;4819;4951;4952;4996;6011;6031;6211;6246;6255;6387;%(DisableSpecificWarnings)</DisableSpecificWarnings>
50       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
51       <FunctionLevelLinking>false</FunctionLevelLinking>
52       <FloatingPointExceptions>false</FloatingPointExceptions>
53       <OpenMPSupport>false</OpenMPSupport>
54       <PrecompiledHeaderFile>
55       </PrecompiledHeaderFile>
56       <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
57       <AssemblerListingLocation>
58       </AssemblerListingLocation>
59       <MultiProcessorCompilation>true</MultiProcessorCompilation>
60       <StringPooling>false</StringPooling>
61       <MinimalRebuild>false</MinimalRebuild>
62       <CompileAs>CompileAsCpp</CompileAs>
63     </ClCompile>
64     <Lib>
65       <AdditionalOptions>/ignore:4221 %(AdditionalOptions)</AdditionalOptions>
66       <UseUnicodeResponseFiles>true</UseUnicodeResponseFiles>
67     </Lib>
68     <Midl>
69       <WarnAsError>true</WarnAsError>
70       <HeaderFileName>$(OutDir)%(Filename).h</HeaderFileName>
71     </Midl>
72     <PostBuildEvent>
73       <Command>REM Do not edit from the Visual Studio IDE! Customize via a $(ProjectName)PostBuild.cmd file.
74 if not exist "$(ProjectDir)$(ProjectName)PostBuild.cmd" exit /b
75
76 set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir)
77 set CONFIGURATIONNAME=$(ConfigurationName)
78 set INPUTDIR=$(InputDir)
79 set INPUTFILENAME=$(InputFileName)
80 set INPUTPATH=$(InputPath)
81 set INTDIR=$(IntDir)
82 set OUTDIR=$(OutDir)
83 set PLATFORMARCHITECTURE=$(PlatformArchitecture)
84 set PLATFORMNAME=$(PlatformName)
85 set PROJECTDIR=$(ProjectDir)
86 set PROJECTFILENAME=$(ProjectFileName)
87 set PROJECTNAME=$(ProjectName)
88 set PROJECTPATH=$(ProjectPath)
89 set SOLUTIONDIR=$(SolutionDir)
90 set SOLUTIONFILENAME=$(SolutionFileName)
91 set SOLUTIONNAME=$(SolutionName)
92 set SOLUTIONPATH=$(SolutionPath)
93 set TARGETDIR=$(TargetDir)
94 set TARGETEXT=$(TargetExt)
95 set TARGETFILENAME=$(TargetFileName)
96 set TARGETPATH=$(TargetPath)
97 set DEBUGSUFFIX=$(DebugSuffix)
98 set WEBKIT_LIBRARIES=$(WEBKIT_LIBRARIES)
99
100 REM If any of the above variables didn't exist previously and
101 REM were set to an empty string, set will set the errorlevel to 1,
102 REM which will cause the project-specific script to think the build
103 REM has failed. This cmd /c call will clear the errorlevel.
104 cmd /c
105
106 "$(ProjectDir)$(ProjectName)PostBuild.cmd"
107 </Command>
108     </PostBuildEvent>
109     <PreBuildEvent>
110       <Command>REM Do not edit from the Visual Studio IDE! Customize via a $(ProjectName)PreBuild.cmd file.
111 if not exist "$(ProjectDir)$(ProjectName)PreBuild.cmd" exit /b
112
113 set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir)
114 set CONFIGURATIONNAME=$(ConfigurationName)
115 set INPUTDIR=$(InputDir)
116 set INPUTFILENAME=$(InputFileName)
117 set INPUTPATH=$(InputPath)
118 set INTDIR=$(IntDir)
119 set OUTDIR=$(OutDir)
120 set PLATFORMARCHITECTURE=$(PlatformArchitecture)
121 set PLATFORMNAME=$(PlatformName)
122 set PROJECTDIR=$(ProjectDir)
123 set PROJECTFILENAME=$(ProjectFileName)
124 set PROJECTNAME=$(ProjectName)
125 set PROJECTPATH=$(ProjectPath)
126 set SOLUTIONDIR=$(SolutionDir)
127 set SOLUTIONFILENAME=$(SolutionFileName)
128 set SOLUTIONNAME=$(SolutionName)
129 set SOLUTIONPATH=$(SolutionPath)
130 set TARGETDIR=$(TargetDir)
131 set TARGETEXT=$(TargetExt)
132 set TARGETFILENAME=$(TargetFileName)
133 set TARGETPATH=$(TargetPath)
134 set DEBUGSUFFIX=$(DebugSuffix)
135 set WEBKIT_LIBRARIES=$(WEBKIT_LIBRARIES)
136
137 REM If any of the above variables didn't exist previously and
138 REM were set to an empty string, set will set the errorlevel to 1,
139 REM which will cause the project-specific script to think the build
140 REM has failed. This cmd /c call will clear the errorlevel.
141 cmd /c
142
143 "$(ProjectDir)$(ProjectName)PreBuild.cmd"
144 </Command>
145     </PreBuildEvent>
146     <PreLinkEvent>
147       <Command>REM Do not edit from the Visual Studio IDE! Customize via a $(ProjectName)PreLink.cmd file.
148 if not exist "$(ProjectDir)$(ProjectName)PreLink.cmd" exit /b
149
150 set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir)
151 set CONFIGURATIONNAME=$(ConfigurationName)
152 set INPUTDIR=$(InputDir)
153 set INPUTFILENAME=$(InputFileName)
154 set INPUTPATH=$(InputPath)
155 set INTDIR=$(IntDir)
156 set OUTDIR=$(OutDir)
157 set PLATFORMARCHITECTURE=$(PlatformArchitecture)
158 set PLATFORMNAME=$(PlatformName)
159 set PROJECTDIR=$(ProjectDir)
160 set PROJECTFILENAME=$(ProjectFileName)
161 set PROJECTNAME=$(ProjectName)
162 set PROJECTPATH=$(ProjectPath)
163 set SOLUTIONDIR=$(SolutionDir)
164 set SOLUTIONFILENAME=$(SolutionFileName)
165 set SOLUTIONNAME=$(SolutionName)
166 set SOLUTIONPATH=$(SolutionPath)
167 set TARGETDIR=$(TargetDir)
168 set TARGETEXT=$(TargetExt)
169 set TARGETFILENAME=$(TargetFileName)
170 set TARGETPATH=$(TargetPath)
171 set DEBUGSUFFIX=$(DebugSuffix)
172 set WEBKIT_LIBRARIES=$(WEBKIT_LIBRARIES)
173
174 REM If any of the above variables didn't exist previously and
175 REM were set to an empty string, set will set the errorlevel to 1,
176 REM which will cause the project-specific script to think the build
177 REM has failed. This cmd /c call will clear the errorlevel.
178 cmd /c
179
180 "$(ProjectDir)$(ProjectName)PreLink.cmd"
181 </Command>
182     </PreLinkEvent>
183     <ResourceCompile>
184       <Culture>0x0409</Culture>
185       <AdditionalIncludeDirectories>$(IntDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
186     </ResourceCompile>
187     <BuildLog />
188     <Link>
189       <AdditionalLibraryDirectories>$(IntDir)lib$(PlatformArchitecture);$(ConfigurationBuildDir)\lib$(PlatformArchitecture);$(WEBKIT_LIBRARIES)\lib$(PlatformArchitecture)</AdditionalLibraryDirectories>
190       <LinkErrorReporting>PromptImmediately</LinkErrorReporting>
191       <CLRUnmanagedCodeCheck>false</CLRUnmanagedCodeCheck>
192       <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
193       <AssemblyDebug>false</AssemblyDebug>
194       <SubSystem>Windows</SubSystem>
195       <HeapReserveSize>
196       </HeapReserveSize>
197       <HeapCommitSize>
198       </HeapCommitSize>
199       <StackReserveSize>
200       </StackReserveSize>
201       <StackCommitSize>
202       </StackCommitSize>
203       <LargeAddressAware>
204       </LargeAddressAware>
205       <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
206       <EnableUAC>
207       </EnableUAC>
208       <UACExecutionLevel>
209       </UACExecutionLevel>
210       <UACUIAccess>
211       </UACUIAccess>
212       <OptimizeReferences>true</OptimizeReferences>
213       <EnableCOMDATFolding>true</EnableCOMDATFolding>
214       <RandomizedBaseAddress>false</RandomizedBaseAddress>
215       <CLRThreadAttribute>DefaultThreadingAttribute</CLRThreadAttribute>
216       <ImportLibrary>$(ConfigurationBuildDir)\lib$(PlatformArchitecture)\$(TargetName).lib</ImportLibrary>
217     </Link>
218     <Bscmake />
219     <Xdcmake />
220     <ManifestResourceCompile>
221       <ResourceOutputFileName>$(IntDir)\$(TargetName)$(TargetExt).embed.manifest.res</ResourceOutputFileName>
222     </ManifestResourceCompile>
223     <ProjectReference>
224       <LinkLibraryDependencies>false</LinkLibraryDependencies>
225     </ProjectReference>
226     <BuildLog>
227       <Path>$(IntDir)BuildLog.htm</Path>
228     </BuildLog>
229   </ItemDefinitionGroup>
230   <ItemGroup>
231     <BuildMacro Include="CONFIGURATIONBUILDDIR">
232       <Value>$(CONFIGURATIONBUILDDIR)</Value>
233       <EnvironmentVariable>true</EnvironmentVariable>
234     </BuildMacro>
235     <BuildMacro Include="DEBUGSUFFIX">
236       <Value>$(DEBUGSUFFIX)</Value>
237       <EnvironmentVariable>true</EnvironmentVariable>
238     </BuildMacro>
239     <BuildMacro Include="PLATFORMARCHITECTURE">
240       <Value>$(PLATFORMARCHITECTURE)</Value>
241       <EnvironmentVariable>true</EnvironmentVariable>
242     </BuildMacro>
243   </ItemGroup>
244 </Project>