Browse Source

windows/msvc: Enable overriding directories used in the build.

Append to PyIncDirs, used to define include directories specific to
MicroPython, instead of just overwriting it so project files importing this
file can define additional directories.  And allow defining the target
directory for the executable instead of hardcoding it to the windows
directory.  Main reason for this change is that it will allow building
mpy-cross with msvc.
pull/5122/head
stijn 7 years ago
committed by Damien George
parent
commit
146c32a141
  1. 2
      ports/windows/msvc/common.props
  2. 3
      ports/windows/msvc/paths.props

2
ports/windows/msvc/common.props

@ -28,7 +28,7 @@
</ItemDefinitionGroup>
<ItemGroup>
<PyOutputFiles Include="$(TargetPath)">
<Destination>$(PyWinDir)%(FileName)%(Extension)</Destination>
<Destination>$(PyTargetDir)%(FileName)%(Extension)</Destination>
</PyOutputFiles>
<PyCookieFiles Include="$(PyBuildDir)copycookie*" Exclude="$(PyFileCopyCookie)"/>
</ItemGroup>

3
ports/windows/msvc/paths.props

@ -26,9 +26,10 @@
<PyBaseDir>$([System.IO.Path]::GetFullPath(`$(MSBuildThisFileDirectory)..\..\..`))\</PyBaseDir>
<PyWinDir>$(PyBaseDir)ports\windows\</PyWinDir>
<PyBuildDir Condition="'$(PyBuildDir)' == ''">$(PyWinDir)build\</PyBuildDir>
<PyTargetDir Condition="'$(PyTargetDir)' == ''">$(PyWinDir)</PyTargetDir>
<!-- All include directories needed for uPy -->
<PyIncDirs>$(PyBaseDir);$(PyWinDir);$(PyBuildDir);$(PyWinDir)msvc</PyIncDirs>
<PyIncDirs>$(PyIncDirs);$(PyBaseDir);$(PyWinDir);$(PyBuildDir);$(PyWinDir)msvc</PyIncDirs>
<!-- Within PyBuildDir different subdirectories are used based on configuration and platform.
By default these are chosen based on the Configuration and Platform properties, but

Loading…
Cancel
Save