aboutsummaryrefslogtreecommitdiff
path: root/windows/msvc/paths.props
diff options
context:
space:
mode:
authorstijn2015-11-12 09:42:12 +0100
committerPaul Sokolovsky2015-12-11 23:42:30 +0200
commit967ceba5b7fc56f7642947b2c48199a4d9db0d4a (patch)
tree1cced2fe4a08f897b4e969c9e2d5cc776c0f9eec /windows/msvc/paths.props
parentc1481bb0ab3c7aa53963e15113dab12dca73693d (diff)
msvc: Use different output directories depending on build type
This allows multiple versions (e.g. Debug/Release, x86/x64) of micropython.exe to co-exist instead and also solves potential problems where msbuild does not completely rebuild the output and/or pdb files when switching between builds, which in turn can cause linker errors in dependent projects. By default exe/map/... files go in windows/build/$(Configuration)$(Platform) After each build micropython.exe is still copied from the above directory to the windows directory though, as that is consistent with the other ports and the test runner by default uses that location as well. Also rename env.props -> path.props which is a clearer name, and add ample documentation in the affected build files. (also see discussion in #1538)
Diffstat (limited to 'windows/msvc/paths.props')
-rw-r--r--windows/msvc/paths.props45
1 files changed, 45 insertions, 0 deletions
diff --git a/windows/msvc/paths.props b/windows/msvc/paths.props
new file mode 100644
index 000000000..716698243
--- /dev/null
+++ b/windows/msvc/paths.props
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <PyPathsIncluded>True</PyPathsIncluded>
+
+ <!-- The properties below specify the output directory structure.
+ This defaults to, for example for Configuration = Debug and Platform = x64:
+
+ micropython [PyBaseDir]
+ |- ...
+ |- windows [PyWinDir]
+ |- ...
+ |- micropython.exe
+ |- build [PyBuildDir]
+ |- Debugx64 [PyOutDir]
+ | |- ...
+ | |- micropython.exe
+ | |- micropython.map
+ | |- obj [PyIntDir]
+ |- genhdr
+
+ Note that the micropython executable will be copied from PyOutDir
+ to PyWinDir after each build. -->
+
+ <!-- Start from project root -->
+ <PyBaseDir>$([System.IO.Path]::GetFullPath(`$(MSBuildThisFileDirectory)..\..`))\</PyBaseDir>
+ <PyWinDir>$(PyBaseDir)windows\</PyWinDir>
+ <PyBuildDir Condition="'$(PyBuildDir)' == ''">$(PyWinDir)build\</PyBuildDir>
+
+ <!-- All include directories needed for uPy -->
+ <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
+ this file might be imported by other projects (to figure out where the artifacts go
+ or what the include files are) and those projects might already contain conflicting
+ Configuration/Platform properties, so allow to override these -->
+ <PyPlatform Condition="'$(PyPlatform)' == ''">$(Platform)</PyPlatform>
+ <PyConfiguration Condition="'$(PyConfiguration)' == ''">$(Configuration)</PyConfiguration>
+
+ <!-- The final destination directories -->
+ <PyOutDir>$(PyBuildDir)$(PyConfiguration)$(PyPlatform)\</PyOutDir>
+ <PyIntDir>$(PyOutDir)obj\</PyIntDir>
+ </PropertyGroup>
+</Project>