CmdPalKeyboardService.vcxproj
1 <?xml version="1.0" encoding="utf-8"?> 2 <Project DefaultTargets="Build" ToolsVersion="15.0" 3 xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 4 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> 5 <Import Project="$(RepoRoot)packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('$(RepoRoot)packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" /> 6 <PropertyGroup Label="Globals"> 7 <CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge> 8 <CppWinRTGenerateWindowsMetadata>true</CppWinRTGenerateWindowsMetadata> 9 <ProjectGuid>{5f63c743-f6ce-4dba-a200-2b3f8a14e8c2}</ProjectGuid> 10 <ProjectName>CmdPalKeyboardService</ProjectName> 11 <RootNamespace>CmdPalKeyboardService</RootNamespace> 12 <AppxPackage>false</AppxPackage> 13 </PropertyGroup> 14 15 <!-- BEGIN common.build.pre.props --> 16 <PropertyGroup Label="Configuration"> 17 <EnableHybridCRT>true</EnableHybridCRT> 18 <UseCrtSDKReferenceStaticWarning Condition="'$(EnableHybridCRT)'=='true'">false</UseCrtSDKReferenceStaticWarning> 19 </PropertyGroup> 20 <!-- END common.build.pre.props --> 21 <!-- BEGIN cppwinrt.build.pre.props --> 22 <PropertyGroup Label="Globals"> 23 <CppWinRTEnabled>true</CppWinRTEnabled> 24 <CppWinRTOptimized>true</CppWinRTOptimized> 25 <DefaultLanguage>en-US</DefaultLanguage> 26 <MinimumVisualStudioVersion>17.0</MinimumVisualStudioVersion> 27 <ApplicationTypeRevision>10.0</ApplicationTypeRevision> 28 </PropertyGroup> 29 <PropertyGroup> 30 <MinimalCoreWin>true</MinimalCoreWin> 31 <AppContainerApplication>true</AppContainerApplication> 32 <WindowsStoreApp>true</WindowsStoreApp> 33 <ApplicationType>Windows Store</ApplicationType> 34 <UseCrtSDKReference Condition="'$(EnableHybridCRT)'=='true'">false</UseCrtSDKReference> <!-- The SDK reference breaks the Hybrid CRT --> 35 </PropertyGroup> 36 <PropertyGroup> 37 <!-- We have to use the Desktop platform for Hybrid CRT to work. --> 38 <_VC_Target_Library_Platform>Desktop</_VC_Target_Library_Platform> 39 <_NoWinAPIFamilyApp>true</_NoWinAPIFamilyApp> 40 </PropertyGroup> 41 <!-- END cppwinrt.build.pre.props --> 42 43 <PropertyGroup Label="Configuration"> 44 <ConfigurationType>DynamicLibrary</ConfigurationType> 45 46 <CharacterSet>Unicode</CharacterSet> 47 <GenerateManifest>false</GenerateManifest> 48 </PropertyGroup> 49 <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration"> 50 <UseDebugLibraries>true</UseDebugLibraries> 51 <LinkIncremental>true</LinkIncremental> 52 </PropertyGroup> 53 <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration"> 54 <UseDebugLibraries>false</UseDebugLibraries> 55 <WholeProgramOptimization>true</WholeProgramOptimization> 56 <LinkIncremental>false</LinkIncremental> 57 </PropertyGroup> 58 59 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> 60 61 <ImportGroup Label="ExtensionSettings"> 62 </ImportGroup> 63 <ImportGroup Label="Shared"> 64 </ImportGroup> 65 <ImportGroup Label="PropertySheets"> 66 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> 67 </ImportGroup> 68 <ImportGroup Label="PropertySheets"> 69 <Import Project="PropertySheet.props" /> 70 </ImportGroup> 71 <PropertyGroup Label="UserMacros" /> 72 <PropertyGroup> 73 <TargetName>CmdPalKeyboardService</TargetName> 74 <OutDir>$(RepoRoot)$(Platform)\$(Configuration)\</OutDir> 75 </PropertyGroup> 76 <ItemDefinitionGroup> 77 <ClCompile> 78 <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> 79 <WarningLevel>Level4</WarningLevel> 80 <AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions> 81 <PreprocessorDefinitions>_WINRT_DLL;WINRT_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions> 82 <AdditionalIncludeDirectories>../../..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> 83 <AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories> 84 </ClCompile> 85 <Link> 86 <SubSystem>Console</SubSystem> 87 <GenerateWindowsMetadata>false</GenerateWindowsMetadata> 88 <ModuleDefinitionFile>CmdPalKeyboardService.def</ModuleDefinitionFile> 89 <AdditionalDependencies>Shell32.lib;user32.lib;%(AdditionalDependencies)</AdditionalDependencies> 90 </Link> 91 </ItemDefinitionGroup> 92 <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'"> 93 <ClCompile> 94 <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> 95 </ClCompile> 96 </ItemDefinitionGroup> 97 <ItemDefinitionGroup Condition="'$(Configuration)'=='Release'"> 98 <ClCompile> 99 <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> 100 </ClCompile> 101 <Link> 102 <EnableCOMDATFolding>true</EnableCOMDATFolding> 103 <OptimizeReferences>true</OptimizeReferences> 104 </Link> 105 </ItemDefinitionGroup> 106 <ItemGroup> 107 <ClInclude Include="pch.h" /> 108 <ClInclude Include="KeyboardListener.h"> 109 <DependentUpon>KeyboardListener.idl</DependentUpon> 110 </ClInclude> 111 </ItemGroup> 112 <ItemGroup> 113 <ClCompile Include="pch.cpp"> 114 <PrecompiledHeader>Create</PrecompiledHeader> 115 </ClCompile> 116 <ClCompile Include="KeyboardListener.cpp"> 117 <DependentUpon>KeyboardListener.idl</DependentUpon> 118 </ClCompile> 119 <ClCompile Include="$(GeneratedFilesDir)module.g.cpp" /> 120 </ItemGroup> 121 <ItemGroup> 122 <Midl Include="KeyboardListener.idl" /> 123 </ItemGroup> 124 <ItemGroup> 125 <None Include="packages.config" /> 126 <None Include="CmdPalKeyboardService.def" /> 127 </ItemGroup> 128 <ItemGroup> 129 <None Include="PropertySheet.props" /> 130 </ItemGroup> 131 132 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> 133 <Import Project="$(RepoRoot)deps\spdlog.props" /> 134 <ImportGroup Label="ExtensionTargets"> 135 <Import Project="$(RepoRoot)packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('$(RepoRoot)packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" /> 136 </ImportGroup> 137 <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> 138 <PropertyGroup> 139 <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> 140 </PropertyGroup> 141 <Error Condition="!Exists('$(RepoRoot)packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '$(RepoRoot)packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props'))" /> 142 <Error Condition="!Exists('$(RepoRoot)packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(RepoRoot)packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets'))" /> 143 </Target> 144 145 <!-- BEGIN common.build.post.props --> 146 <!-- 147 The Hybrid CRT model statically links the runtime and STL and dynamically 148 links the UCRT instead of the VC++ CRT. The UCRT ships with Windows. 149 WinAppSDK asserts that this is "supported according to the CRT maintainer." 150 151 This must come before Microsoft.Cpp.targets because it manipulates ClCompile.RuntimeLibrary. 152 --> 153 <ItemDefinitionGroup Condition="'$(EnableHybridCRT)'=='true' and '$(Configuration)'=='Debug'"> 154 <ClCompile> 155 <!-- We use MultiThreadedDebug, rather than MultiThreadedDebugDLL, to avoid DLL dependencies on VCRUNTIME140d.dll and MSVCP140d.dll. --> 156 <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> 157 </ClCompile> 158 <Link> 159 <!-- Link statically against the runtime and STL, but link dynamically against the CRT by ignoring the static CRT 160 lib and instead linking against the Universal CRT DLL import library. This "hybrid" linking mechanism is 161 supported according to the CRT maintainer. Dynamic linking against the CRT makes the binaries a bit smaller 162 than they would otherwise be if the CRT, runtime, and STL were all statically linked in. --> 163 <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries);libucrtd.lib</IgnoreSpecificDefaultLibraries> 164 <AdditionalOptions>%(AdditionalOptions) /defaultlib:ucrtd.lib</AdditionalOptions> 165 </Link> 166 </ItemDefinitionGroup> 167 <ItemDefinitionGroup Condition="'$(EnableHybridCRT)'=='true' and ('$(Configuration)'=='Release' or '$(Configuration)'=='AuditMode')"> 168 <ClCompile> 169 <!-- We use MultiThreaded, rather than MultiThreadedDLL, to avoid DLL dependencies on VCRUNTIME140.dll and MSVCP140.dll. --> 170 <RuntimeLibrary>MultiThreaded</RuntimeLibrary> 171 </ClCompile> 172 <Link> 173 <!-- Link statically against the runtime and STL, but link dynamically against the CRT by ignoring the static CRT 174 lib and instead linking against the Universal CRT DLL import library. This "hybrid" linking mechanism is 175 supported according to the CRT maintainer. Dynamic linking against the CRT makes the binaries a bit smaller 176 than they would otherwise be if the CRT, runtime, and STL were all statically linked in. --> 177 <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries);libucrt.lib</IgnoreSpecificDefaultLibraries> 178 <AdditionalOptions>%(AdditionalOptions) /defaultlib:ucrt.lib</AdditionalOptions> 179 </Link> 180 </ItemDefinitionGroup> 181 <!-- END common.build.post.props --> 182 183 </Project>