aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorstijn2017-08-14 12:12:30 +0200
committerDamien George2019-09-18 22:14:37 +1000
commit146c32a14196356fbf3c3b5f2a7c6e41e3b59389 (patch)
tree1b65e5145552d575030151b872447b8614a9e0e4 /ports
parent94873a48263d5923ba0640900b801b13fcd309d7 (diff)
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.
Diffstat (limited to 'ports')
-rw-r--r--ports/windows/msvc/common.props2
-rw-r--r--ports/windows/msvc/paths.props3
2 files changed, 3 insertions, 2 deletions
diff --git a/ports/windows/msvc/common.props b/ports/windows/msvc/common.props
index 6735f96d7..2545a3646 100644
--- a/ports/windows/msvc/common.props
+++ b/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>
diff --git a/ports/windows/msvc/paths.props b/ports/windows/msvc/paths.props
index db3af4c0f..cfd43b708 100644
--- a/ports/windows/msvc/paths.props
+++ b/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