|
| 1 | +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 2 | + |
| 3 | + <!-- Set common MSBuild properties and item metadata for CppWinRT tool and tests --> |
| 4 | + |
| 5 | + <PropertyGroup Condition="'$(VisualStudioVersion)' == '15.0'"> |
| 6 | + <PlatformToolset>v141</PlatformToolset> |
| 7 | + <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion> |
| 8 | + </PropertyGroup> |
| 9 | + |
| 10 | + <PropertyGroup Condition="'$(VisualStudioVersion)' == '16.0'"> |
| 11 | + <PlatformToolset>v142</PlatformToolset> |
| 12 | + <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> |
| 13 | + </PropertyGroup> |
| 14 | + |
| 15 | + <!-- |
| 16 | + Can be used as follows. |
| 17 | +
|
| 18 | + Compile with Visual C++: |
| 19 | +
|
| 20 | + msbuild /m /p:Configuration=Debug,Platform=x64 cppwinrt.sln |
| 21 | +
|
| 22 | + Compile with Clang: |
| 23 | +
|
| 24 | + msbuild /m /p:Configuration=Debug,Platform=x64,Clang=1 cppwinrt.sln |
| 25 | +
|
| 26 | + Optionally add /t:<project> to only build a given a solution project: |
| 27 | +
|
| 28 | + msbuild /m /p:Configuration=Debug,Platform=x64,Clang=1 cppwinrt.sln /t:cppwinrt |
| 29 | + --> |
| 30 | + |
| 31 | + <PropertyGroup Condition="'$(Clang)'=='1'"> |
| 32 | + <CLToolExe>clang-cl.exe</CLToolExe> |
| 33 | + <CLToolPath>C:\Program Files\LLVM\bin</CLToolPath> |
| 34 | + </PropertyGroup> |
| 35 | + |
| 36 | + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
| 37 | + |
| 38 | + <PropertyGroup> |
| 39 | + <XlangBuildVersion Condition="'$(XlangBuildVersion)'==''">2.3.4.5</XlangBuildVersion> |
| 40 | + <CmakePlatform>$(Platform)</CmakePlatform> |
| 41 | + <CmakePlatform Condition="'$(Platform)'=='Win32'">x86</CmakePlatform> |
| 42 | + <CmakeOutDir Condition="'$(CmakeOutDir)'==''">$(SolutionDir)build\$(CmakePlatform)\$(Configuration)</CmakeOutDir> |
| 43 | + <CppWinRTDir>$(CmakeOutDir)\</CppWinRTDir> |
| 44 | + <CppWinRTDir Condition="'$(Platform)'=='ARM' or '$(Platform)'=='ARM64'">$(SolutionDir)build\x86\$(Configuration)\</CppWinRTDir> |
| 45 | + <OutDir>$(CmakeOutDir)\</OutDir> |
| 46 | + </PropertyGroup> |
| 47 | + |
| 48 | + <ItemDefinitionGroup> |
| 49 | + <ClCompile> |
| 50 | + <WarningLevel>Level4</WarningLevel> |
| 51 | + <SDLCheck>true</SDLCheck> |
| 52 | + <ConformanceMode>true</ConformanceMode> |
| 53 | + <LanguageStandard>stdcpp17</LanguageStandard> |
| 54 | + <PrecompiledHeader>Use</PrecompiledHeader> |
| 55 | + <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> |
| 56 | + <PreprocessorDefinitions>XLANG_VERSION_STRING="$(XlangBuildVersion)";NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| 57 | + <MultiProcessorCompilation>true</MultiProcessorCompilation> |
| 58 | + <AdditionalOptions>/await /bigobj</AdditionalOptions> |
| 59 | + <AdditionalOptions Condition="'$(Clang)'=='1'">-Wno-unused-command-line-argument -fno-delayed-template-parsing -Xclang -fcoroutines-ts -mcx16</AdditionalOptions> |
| 60 | + </ClCompile> |
| 61 | + <Link> |
| 62 | + <AdditionalDependencies>onecore.lib</AdditionalDependencies> |
| 63 | + </Link> |
| 64 | + <ResourceCompile> |
| 65 | + <PreprocessorDefinitions>XLANG_VERSION_STRING="$(XlangBuildVersion)";%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| 66 | + </ResourceCompile> |
| 67 | + </ItemDefinitionGroup> |
| 68 | + |
| 69 | +</Project> |
0 commit comments