mirror of
https://github.com/licsber/micropython.git
synced 2024-09-20 17:10:24 +08:00
94873a4826
We want the .vcxproj to be just a container with the minimum content for making it work as a project file for Visual Studio and MSBuild, whereas the actual build options and actions get placed in separate reusable files. This was roughly the case already except some compiler options were overlooked; fix this here: we'll need those common options when adding a project file for building mpy-cross.
50 lines
2.6 KiB
XML
50 lines
2.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<ImportGroup Label="PropertySheets">
|
|
<Import Project="paths.props" Condition="'$(PyPathsIncluded)' != 'True'"/>
|
|
</ImportGroup>
|
|
<PropertyGroup Label="UserMacros" />
|
|
<PropertyGroup>
|
|
<OutDir>$(PyOutDir)</OutDir>
|
|
<IntDir>$(PyIntDir)</IntDir>
|
|
<PyFileCopyCookie>$(PyBuildDir)copycookie$(Configuration)$(Platform)</PyFileCopyCookie>
|
|
<CharacterSet>MultiByte</CharacterSet>
|
|
</PropertyGroup>
|
|
<ItemDefinitionGroup>
|
|
<ClCompile>
|
|
<AdditionalIncludeDirectories>$(PyIncDirs);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
<PreprocessorDefinitions>_USE_MATH_DEFINES;_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
<SDLCheck>false</SDLCheck>
|
|
<WarningLevel>Level1</WarningLevel>
|
|
<ExceptionHandling>false</ExceptionHandling>
|
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
|
<MinimalRebuild>false</MinimalRebuild>
|
|
<TreatWarningAsError>true</TreatWarningAsError>
|
|
</ClCompile>
|
|
<Link>
|
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
<GenerateMapFile>true</GenerateMapFile>
|
|
</Link>
|
|
</ItemDefinitionGroup>
|
|
<ItemGroup>
|
|
<PyOutputFiles Include="$(TargetPath)">
|
|
<Destination>$(PyWinDir)%(FileName)%(Extension)</Destination>
|
|
</PyOutputFiles>
|
|
<PyCookieFiles Include="$(PyBuildDir)copycookie*" Exclude="$(PyFileCopyCookie)"/>
|
|
</ItemGroup>
|
|
|
|
<!-- Copy PyOutputFiles to their target destination.
|
|
To force this when switching between platforms/configurations which are already up-to-date (and as such,
|
|
for which a build wouldn't even start because all outputs are effectively newer than the inputs)
|
|
an empty file $(PyFileCopyCookie) is created serving as a record to indicate what was last copied,
|
|
and any previous records are deleted. So when switching between builds which are otherwise up-to-date
|
|
the tracker will notice a missing file and a build is started anyway (and it will just copy our files). -->
|
|
<Target Name="CopyFilesToWinDir" AfterTargets="Build"
|
|
Inputs="$(TargetPath)" Outputs="$(PyFileCopyCookie);@(PyOutputFiles->'%(Destination)')">
|
|
<Delete Files="@(PyCookieFiles)"/>
|
|
<Touch Files="$(PyFileCopyCookie)" AlwaysCreate="true"/>
|
|
<Copy SourceFiles="%(PyOutputFiles.Identity)" DestinationFiles="%(PyOutputFiles.Destination)"/>
|
|
<WriteLinesToFile File="$(TLogLocation)$(ProjectName).write.u.tlog" Lines="$(PyFileCopyCookie);@(PyOutputFiles->'%(Destination)')" Overwrite="True"/>
|
|
</Target>
|
|
</Project>
|