forked from microsoft/cppwinrt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cppwinrt.props
69 lines (54 loc) · 2.84 KB
/
cppwinrt.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<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>