cppwinrt/cppwinrt.props

70 строки
2.8 KiB
XML

<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Set common MSBuild properties and item metadata for CppWinRT tool and tests -->
<PropertyGroup Condition="'$(VisualStudioVersion)' == '15.0'">
<PlatformToolset>v141</PlatformToolset>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '16.0'">
<PlatformToolset>v142</PlatformToolset>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<!--
Can be used as follows.
Compile with Visual C++:
msbuild /m /p:Configuration=Debug,Platform=x64 cppwinrt.sln
Compile with Clang:
msbuild /m /p:Configuration=Debug,Platform=x64,Clang=1 cppwinrt.sln
Optionally add /t:<project> to only build a given a solution project:
msbuild /m /p:Configuration=Debug,Platform=x64,Clang=1 cppwinrt.sln /t:cppwinrt
-->
<PropertyGroup Condition="'$(Clang)'=='1'">
<CLToolExe>clang-cl.exe</CLToolExe>
<CLToolPath>C:\Program Files\LLVM\bin</CLToolPath>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup>
<CppWinRTBuildVersion Condition="'$(CppWinRTBuildVersion)'==''">2.3.4.5</CppWinRTBuildVersion>
<CmakePlatform>$(Platform)</CmakePlatform>
<CmakePlatform Condition="'$(Platform)'=='Win32'">x86</CmakePlatform>
<CmakeOutDir Condition="'$(CmakeOutDir)'==''">$(SolutionDir)_build\$(CmakePlatform)\$(Configuration)</CmakeOutDir>
<CppWinRTDir>$(CmakeOutDir)\</CppWinRTDir>
<CppWinRTDir Condition="'$(Platform)'=='ARM' or '$(Platform)'=='ARM64'">$(SolutionDir)_build\x86\$(Configuration)\</CppWinRTDir>
<OutDir>$(CmakeOutDir)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PreprocessorDefinitions>CPPWINRT_VERSION_STRING="$(CppWinRTBuildVersion)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/await /bigobj</AdditionalOptions>
<AdditionalOptions Condition="'$(Clang)'=='1'">-Wno-unused-command-line-argument -fno-delayed-template-parsing -Xclang -fcoroutines-ts -mcx16</AdditionalOptions>
</ClCompile>
<Link>
<AdditionalDependencies>onecore.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
<PreprocessorDefinitions>CPPWINRT_VERSION_STRING="$(CppWinRTBuildVersion)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
</Project>