2019-05-03 00:29:04 +02:00
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2019-11-05 23:29:11 +01:00
<Import Project="$(MSBuildThisFileDirectory)common.build.post.props" />
2019-05-03 00:29:04 +02:00
<!-- For Cascadia projects, we want to copy the output dll up a directory
from where it was binplaced.
e.g. TerminalApp.vcxproj builds OpenConsole/x64/Debug/TerminalApp/TerminalApp.dll
this should be copied to OpenConsole/x64/Debug/TerminalApp.dll
Otherwise, the wapproj won't be able to find it properly.
Additionally, the wapproj expects the x86 version to not include the
platform in the path, go figure.
A project can request to not do this step by setting DontCopyOutput to true.
-->
<ItemDefinitionGroup Condition="'$(NoOutputRedirection)'=='true' And '$(ConfigurationType)'=='DynamicLibrary' And '$(DontCopyOutput)'!='true'">
<PostBuildEvent Condition="'$(Platform)'!='Win32'">
<Command>
echo OutDir=$(OutDir)
2019-05-17 02:48:00 +02:00
(xcopy /Y "$(OutDir)$(ProjectName).dll" "$(OpenConsoleDir)$(Platform)\$(Configuration)\$(ProjectName).dll*" )
2019-11-05 23:29:11 +01:00
(xcopy /Y "$(OutDir)$(ProjectName)FullPDB.pdb" "$(OpenConsoleDir)$(Platform)\$(Configuration)\$(ProjectName)FullPDB.pdb*" )
2019-05-03 00:29:04 +02:00
</Command>
</PostBuildEvent>
<PostBuildEvent Condition="'$(Platform)'=='Win32'">
<Command>
echo OutDir=$(OutDir)
2019-05-17 02:48:00 +02:00
(xcopy /Y "$(OutDir)$(ProjectName).dll" "$(OpenConsoleDir)$(Configuration)\$(ProjectName).dll*" )
2019-11-05 23:29:11 +01:00
(xcopy /Y "$(OutDir)$(ProjectName)FullPDB.pdb" "$(OpenConsoleDir)$(Configuration)\$(ProjectName)FullPDB.pdb*" )
2019-05-03 00:29:04 +02:00
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<!--
For whatever reason, GENERATEPROJECTPRIFILE is incapable of creating this
2019-05-21 08:15:44 +02:00
directory on its own, it just assumes it exists.
2019-05-03 00:29:04 +02:00
Also make the directory w/o the platform, because the x86 build in CI will
try to place the pri files into
C:\BA\3126\s\Release\$(ProjectName)\$(ProjectName).pri (for example)
-->
<ItemDefinitionGroup Condition="'$(Platform)'!='Win32'">
<PreBuildEvent>
<Command>
2019-05-14 23:27:39 +02:00
if not exist "$(OpenConsoleDir)$(Platform)\$(Configuration)\$(ProjectName)" mkdir "$(OpenConsoleDir)$(Platform)\$(Configuration)\$(ProjectName)"
2019-05-03 00:29:04 +02:00
</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
<PreBuildEvent>
<Command>
2019-05-14 23:27:39 +02:00
if not exist "$(OpenConsoleDir)$(Configuration)\$(ProjectName)" mkdir "$(OpenConsoleDir)\$(Configuration)\$(ProjectName)"
2019-05-03 00:29:04 +02:00
</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ImportGroup Label="ExtensionTargets">
2020-03-23 18:15:24 +01:00
<Import Project="$(OpenConsoleDir)\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('$(OpenConsoleDir)\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets')" />
2019-05-03 00:29:04 +02:00
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
2020-03-23 18:15:24 +01:00
<Error Condition="!Exists('$(OpenConsoleDir)\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '$(OpenConsoleDir)\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('$(OpenConsoleDir)\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(OpenConsoleDir)\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets'))" />
2019-05-03 00:29:04 +02:00
</Target>
</Project>