blob: ef344bed49e9aabfa228da03fa189a3b039e8f43 [file] [log] [blame]
Brian Curtin401f9f32012-05-13 11:19:23 -05001<?xml version="1.0" encoding="utf-8"?>
2<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <ItemGroup Label="ProjectConfigurations">
Paul Monson8a1657b2019-02-14 08:31:30 -08004 <ProjectConfiguration Include="Debug|ARM">
5 <Configuration>Debug</Configuration>
6 <Platform>ARM</Platform>
7 </ProjectConfiguration>
Paul Monsonf96e7fd2019-05-17 10:07:24 -07008 <ProjectConfiguration Include="Debug|ARM64">
9 <Configuration>Debug</Configuration>
10 <Platform>ARM64</Platform>
11 </ProjectConfiguration>
Steve Dower65e4cb12014-11-22 12:54:57 -080012 <ProjectConfiguration Include="Debug|Win32">
13 <Configuration>Debug</Configuration>
14 <Platform>Win32</Platform>
15 </ProjectConfiguration>
16 <ProjectConfiguration Include="Debug|x64">
17 <Configuration>Debug</Configuration>
18 <Platform>x64</Platform>
19 </ProjectConfiguration>
Paul Monson8a1657b2019-02-14 08:31:30 -080020 <ProjectConfiguration Include="PGInstrument|ARM">
21 <Configuration>PGInstrument</Configuration>
22 <Platform>ARM</Platform>
23 </ProjectConfiguration>
Paul Monsonf96e7fd2019-05-17 10:07:24 -070024 <ProjectConfiguration Include="PGInstrument|ARM64">
25 <Configuration>PGInstrument</Configuration>
26 <Platform>ARM64</Platform>
27 </ProjectConfiguration>
Brian Curtin401f9f32012-05-13 11:19:23 -050028 <ProjectConfiguration Include="PGInstrument|Win32">
29 <Configuration>PGInstrument</Configuration>
30 <Platform>Win32</Platform>
31 </ProjectConfiguration>
32 <ProjectConfiguration Include="PGInstrument|x64">
33 <Configuration>PGInstrument</Configuration>
34 <Platform>x64</Platform>
35 </ProjectConfiguration>
Paul Monson8a1657b2019-02-14 08:31:30 -080036 <ProjectConfiguration Include="PGUpdate|ARM">
37 <Configuration>PGUpdate</Configuration>
38 <Platform>ARM</Platform>
39 </ProjectConfiguration>
Paul Monsonf96e7fd2019-05-17 10:07:24 -070040 <ProjectConfiguration Include="PGUpdate|ARM64">
41 <Configuration>PGUpdate</Configuration>
42 <Platform>ARM64</Platform>
43 </ProjectConfiguration>
Brian Curtin401f9f32012-05-13 11:19:23 -050044 <ProjectConfiguration Include="PGUpdate|Win32">
45 <Configuration>PGUpdate</Configuration>
46 <Platform>Win32</Platform>
47 </ProjectConfiguration>
48 <ProjectConfiguration Include="PGUpdate|x64">
49 <Configuration>PGUpdate</Configuration>
50 <Platform>x64</Platform>
51 </ProjectConfiguration>
Paul Monson8a1657b2019-02-14 08:31:30 -080052 <ProjectConfiguration Include="Release|ARM">
53 <Configuration>Release</Configuration>
54 <Platform>ARM</Platform>
55 </ProjectConfiguration>
Paul Monsonf96e7fd2019-05-17 10:07:24 -070056 <ProjectConfiguration Include="Release|ARM64">
57 <Configuration>Release</Configuration>
58 <Platform>ARM64</Platform>
59 </ProjectConfiguration>
Brian Curtin401f9f32012-05-13 11:19:23 -050060 <ProjectConfiguration Include="Release|Win32">
61 <Configuration>Release</Configuration>
62 <Platform>Win32</Platform>
63 </ProjectConfiguration>
64 <ProjectConfiguration Include="Release|x64">
65 <Configuration>Release</Configuration>
66 <Platform>x64</Platform>
67 </ProjectConfiguration>
68 </ItemGroup>
69 <PropertyGroup Label="Globals">
70 <ProjectGuid>{885D4898-D08D-4091-9C40-C700CFE3FC5A}</ProjectGuid>
71 <RootNamespace>python3dll</RootNamespace>
72 <Keyword>Win32Proj</Keyword>
Steve Dower65e4cb12014-11-22 12:54:57 -080073 <TargetName>python3</TargetName>
Steve Dower65e4cb12014-11-22 12:54:57 -080074 <SupportPGO>false</SupportPGO>
Brian Curtin401f9f32012-05-13 11:19:23 -050075 </PropertyGroup>
Steve Dower65e4cb12014-11-22 12:54:57 -080076 <Import Project="python.props" />
Brian Curtin401f9f32012-05-13 11:19:23 -050077 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
Steve Dower65e4cb12014-11-22 12:54:57 -080078 <PropertyGroup Label="Configuration">
79 <ConfigurationType>DynamicLibrary</ConfigurationType>
Brian Curtin401f9f32012-05-13 11:19:23 -050080 </PropertyGroup>
81 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
82 <ImportGroup Label="ExtensionSettings">
83 </ImportGroup>
Steve Dower65e4cb12014-11-22 12:54:57 -080084 <ImportGroup Label="PropertySheets">
Brian Curtin401f9f32012-05-13 11:19:23 -050085 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
86 <Import Project="pyproject.props" />
Brian Curtin401f9f32012-05-13 11:19:23 -050087 </ImportGroup>
88 <PropertyGroup Label="UserMacros" />
89 <PropertyGroup>
90 <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
Steve Dower65e4cb12014-11-22 12:54:57 -080091 <_Machine>X86</_Machine>
92 <_Machine Condition="$(Platform) == 'x64'">X64</_Machine>
Paul Monson8a1657b2019-02-14 08:31:30 -080093 <_Machine Condition="$(Platform) == 'ARM'">ARM</_Machine>
Paul Monsonf96e7fd2019-05-17 10:07:24 -070094 <_Machine Condition="$(Platform) == 'ARM64'">ARM64</_Machine>
Steve Dower945863a2016-07-13 19:58:21 -070095 <ExtensionsToDeleteOnClean>$(ExtensionsToDeleteOnClean);$(IntDir)python3_d.def;$(IntDir)python3stub.def</ExtensionsToDeleteOnClean>
Brian Curtin401f9f32012-05-13 11:19:23 -050096 </PropertyGroup>
97 <ItemDefinitionGroup>
Steve Dower65e4cb12014-11-22 12:54:57 -080098 <ClCompile>
99 <BufferSecurityCheck>false</BufferSecurityCheck>
100 </ClCompile>
101 <Link>
102 <AdditionalDependencies>$(OutDir)$(TargetName)stub.lib</AdditionalDependencies>
Steve Dowere5a6c4e2015-01-31 11:17:07 -0800103 <ModuleDefinitionFile Condition="$(Configuration) != 'Debug'">$(PySourcePath)PC\python3.def</ModuleDefinitionFile>
104 <ModuleDefinitionFile Condition="$(Configuration) == 'Debug'">$(IntDir)python3_d.def</ModuleDefinitionFile>
Steve Dower65e4cb12014-11-22 12:54:57 -0800105 <EntryPointSymbol>DllMain</EntryPointSymbol>
106 </Link>
107 <PreLinkEvent>
108 <Command>lib /nologo /def:"$(IntDir)python3stub.def" /out:"$(OutDir)$(TargetName)stub.lib" /MACHINE:$(_Machine)</Command>
109 <Message>Rebuilding $(TargetName)stub.lib</Message>
110 <Outputs>$(OutDir)$(TargetName)stub.lib</Outputs>
111 </PreLinkEvent>
Brian Curtin401f9f32012-05-13 11:19:23 -0500112 </ItemDefinitionGroup>
113 <ItemGroup>
114 <None Include="..\PC\python3.def" />
115 </ItemGroup>
116 <ItemGroup>
117 <ClCompile Include="..\PC\python3dll.c" />
118 </ItemGroup>
119 <ItemGroup>
120 <ResourceCompile Include="..\PC\python_nt.rc" />
121 </ItemGroup>
122 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
123 <ImportGroup Label="ExtensionTargets">
124 </ImportGroup>
Steve Dowere5a6c4e2015-01-31 11:17:07 -0800125
Steve Dowere97ba4c2018-05-28 12:32:05 -0700126 <Target Name="BuildPython3_dDef" BeforeTargets="BuildStubDef" Condition="$(Configuration) == 'Debug'">
Steve Dowere5a6c4e2015-01-31 11:17:07 -0800127 <ItemGroup>
128 <_DefLines Remove="@(_DefLines)" />
129 <_Lines Remove="@(_Lines)" />
Steve Dowere97ba4c2018-05-28 12:32:05 -0700130 <_OriginalLines Remove="@(_OriginalLines)" />
Steve Dowere5a6c4e2015-01-31 11:17:07 -0800131 </ItemGroup>
Steve Dower65e4cb12014-11-22 12:54:57 -0800132 <ReadLinesFromFile File="..\PC\python3.def">
Steve Dowere5a6c4e2015-01-31 11:17:07 -0800133 <Output TaskParameter="Lines" ItemName="_DefLines" />
134 </ReadLinesFromFile>
Steve Dowere97ba4c2018-05-28 12:32:05 -0700135 <ReadLinesFromFile File="$(IntDir)python3_d.def" Condition="Exists('$(IntDir)python3_d.def')">
136 <Output TaskParameter="Lines" ItemName="_OriginalLines" />
137 </ReadLinesFromFile>
Steve Dowere5a6c4e2015-01-31 11:17:07 -0800138 <PropertyGroup>
139 <_Pattern1>(=python$(MajorVersionNumber)$(MinorVersionNumber))\.</_Pattern1>
140 <_Sub1>$1_d.</_Sub1>
141 <_Pattern2>"python3"</_Pattern2>
142 <_Sub2>"python3_d"</_Sub2>
143 </PropertyGroup>
144 <ItemGroup>
145 <_Lines Include="@(_DefLines)">
146 <New>$([System.Text.RegularExpressions.Regex]::Replace($([System.Text.RegularExpressions.Regex]::Replace(`%(Identity)`, `$(_Pattern1)`, `$(_Sub1)`)), `$(_Pattern2)`, `$(_Sub2)`))</New>
147 </_Lines>
148 </ItemGroup>
149 <MakeDir Directories="$(IntDir)" />
Steve Dowere97ba4c2018-05-28 12:32:05 -0700150 <Message Text="Updating python3_d.def" Condition="@(_Lines->'%(New)') != @(_OriginalLines)" Importance="high" />
151 <WriteLinesToFile File="$(IntDir)python3_d.def" Lines="@(_Lines->'%(New)')" Overwrite="true"
152 Condition="@(_Lines->'%(New)') != @(_OriginalLines)" />
Steve Dowere5a6c4e2015-01-31 11:17:07 -0800153 </Target>
154
Steve Dowere97ba4c2018-05-28 12:32:05 -0700155 <Target Name="BuildStubDef" BeforeTargets="PreLinkEvent">
Steve Dowere5a6c4e2015-01-31 11:17:07 -0800156 <ItemGroup>
157 <_DefLines Remove="@(_DefLines)" />
158 <_Lines Remove="@(_Lines)" />
Steve Dowere97ba4c2018-05-28 12:32:05 -0700159 <_OriginalLines Remove="@(_OriginalLines)" />
Steve Dowere5a6c4e2015-01-31 11:17:07 -0800160 </ItemGroup>
161 <ReadLinesFromFile File="..\PC\python3.def">
162 <Output TaskParameter="Lines" ItemName="_DefLines" />
Steve Dower65e4cb12014-11-22 12:54:57 -0800163 </ReadLinesFromFile>
Steve Dowere97ba4c2018-05-28 12:32:05 -0700164 <ReadLinesFromFile File="$(IntDir)python3stub.def" Condition="Exists('$(IntDir)python3stub.def')">
165 <Output TaskParameter="Lines" ItemName="_OriginalLines" />
166 </ReadLinesFromFile>
Steve Dower65e4cb12014-11-22 12:54:57 -0800167 <PropertyGroup>
168 <_Pattern>^[\w.]+=.+?\.([^ ]+).*$</_Pattern>
169 <_Sub>$1</_Sub>
170 </PropertyGroup>
171 <ItemGroup>
172 <_Lines Include="EXPORTS" />
Steve Dowere5a6c4e2015-01-31 11:17:07 -0800173 <_Symbols Include="@(_DefLines)" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch(`%(Identity)`, `$(_Pattern)`))">
Steve Dower65e4cb12014-11-22 12:54:57 -0800174 <Symbol>$([System.Text.RegularExpressions.Regex]::Replace(`%(Identity)`, `$(_Pattern)`, `$(_Sub)`))</Symbol>
175 </_Symbols>
176 <_Lines Include="@(_Symbols->'%(Symbol)')" />
177 </ItemGroup>
178 <MakeDir Directories="$(IntDir)" />
Steve Dowerf9b364f2018-05-28 14:05:05 -0700179 <Message Text="Updating python3stub.def" Condition="@(_Lines) != @(_OriginalLines)" Importance="high" />
Steve Dowere97ba4c2018-05-28 12:32:05 -0700180 <WriteLinesToFile File="$(IntDir)python3stub.def" Lines="@(_Lines)" Overwrite="true"
Steve Dowerf9b364f2018-05-28 14:05:05 -0700181 Condition="@(_Lines) != @(_OriginalLines)" />
Steve Dower65e4cb12014-11-22 12:54:57 -0800182 </Target>
Brian Curtin401f9f32012-05-13 11:19:23 -0500183</Project>