/ src / modules / imageresizer / ImageResizerContextMenu / ImageResizerContextMenu.vcxproj
ImageResizerContextMenu.vcxproj
  1  <?xml version="1.0" encoding="utf-8"?>
  2  <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  4    <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')" />
  5    <Target Name="GenerateResourceFiles" BeforeTargets="PrepareForBuild">
  6      <Exec Command="powershell -NonInteractive -executionpolicy Unrestricted $(RepoRoot)tools\build\convert-resx-to-rc.ps1 $(MSBuildThisFileDirectory) resource.base.h resource.h ImageResizerContextMenu.base.rc ImageResizerContextMenu.rc" />
  7    </Target>
  8    <PropertyGroup Label="Globals">
  9      <Keyword>Win32Proj</Keyword>
 10      <ProjectGuid>{93b72a06-c8bd-484f-a6f7-c9f280b150bf}</ProjectGuid>
 11      <RootNamespace>ImageResizerContextMenu</RootNamespace>
 12    </PropertyGroup>
 13    <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
 14      <ConfigurationType>DynamicLibrary</ConfigurationType>
 15      <UseDebugLibraries>true</UseDebugLibraries>
 16      
 17    </PropertyGroup>
 18    <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
 19      <ConfigurationType>DynamicLibrary</ConfigurationType>
 20      <UseDebugLibraries>false</UseDebugLibraries>
 21      
 22      <WholeProgramOptimization>true</WholeProgramOptimization>
 23    </PropertyGroup>
 24    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
 25    <ImportGroup Label="ExtensionSettings">
 26    </ImportGroup>
 27    <ImportGroup Label="Shared">
 28    </ImportGroup>
 29    <ImportGroup Label="PropertySheets">
 30      <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
 31    </ImportGroup>
 32    <PropertyGroup Label="UserMacros" />
 33    <PropertyGroup>
 34      <TargetName>PowerToys.ImageResizerContextMenu</TargetName>
 35      <!-- Needs a different int dir to avoid conflicts in msix creation. -->
 36      <IntDir>$(SolutionDir)$(Platform)\$(Configuration)\TemporaryBuild\obj\$(ProjectName)\</IntDir>
 37      <OutDir>$(RepoRoot)$(Platform)\$(Configuration)\WinUI3Apps\</OutDir>
 38    </PropertyGroup>
 39    <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
 40      <ClCompile>
 41        <WarningLevel>Level3</WarningLevel>
 42        <SDLCheck>true</SDLCheck>
 43        <PreprocessorDefinitions>_DEBUG;IMAGERESIZERCONTEXTMENU_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 44        <ConformanceMode>true</ConformanceMode>
 45        <AdditionalIncludeDirectories>..\ImageResizerLib;$(RepoRoot)src\common\inc;$(RepoRoot)src\common\Telemetry;..\..\;$(RepoRoot)src\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 46      </ClCompile>
 47      <Link>
 48        <SubSystem>Windows</SubSystem>
 49        <GenerateDebugInformation>true</GenerateDebugInformation>
 50        <EnableUAC>false</EnableUAC>
 51        <ModuleDefinitionFile>Source.def</ModuleDefinitionFile>
 52      </Link>
 53      <PreBuildEvent>
 54        <Command>del $(OutDir)\ImageResizerContextMenuPackage.msix /q
 55  MakeAppx.exe pack /d . /p $(OutDir)ImageResizerContextMenuPackage.msix /nv</Command>
 56      </PreBuildEvent>
 57    </ItemDefinitionGroup>
 58    <ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
 59      <ClCompile>
 60        <WarningLevel>Level3</WarningLevel>
 61        <FunctionLevelLinking>true</FunctionLevelLinking>
 62        <IntrinsicFunctions>true</IntrinsicFunctions>
 63        <SDLCheck>true</SDLCheck>
 64        <PreprocessorDefinitions>NDEBUG;IMAGERESIZERCONTEXTMENU_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 65        <ConformanceMode>true</ConformanceMode>
 66        <AdditionalIncludeDirectories>..\ImageResizerLib;$(RepoRoot)src\common\inc;$(RepoRoot)src\common\Telemetry;..\..\;$(RepoRoot)src\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 67      </ClCompile>
 68      <Link>
 69        <SubSystem>Windows</SubSystem>
 70        <EnableCOMDATFolding>true</EnableCOMDATFolding>
 71        <OptimizeReferences>true</OptimizeReferences>
 72        <GenerateDebugInformation>true</GenerateDebugInformation>
 73        <EnableUAC>false</EnableUAC>
 74        <ModuleDefinitionFile>Source.def</ModuleDefinitionFile>
 75      </Link>
 76      <PreBuildEvent>
 77        <Command>del $(OutDir)\ImageResizerContextMenuPackage.msix /q
 78  MakeAppx.exe pack /d . /p $(OutDir)ImageResizerContextMenuPackage.msix /nv</Command>
 79      </PreBuildEvent>
 80    </ItemDefinitionGroup>
 81    <ItemGroup>
 82      <ClInclude Include="framework.h" />
 83      <ClInclude Include="pch.h" />
 84      <None Include="resource.base.h" />
 85      <ClInclude Include="Generated Files/resource.h" />
 86      <ClInclude Include="targetver.h" />
 87    </ItemGroup>
 88    <ItemGroup>
 89      <ClCompile Include="dllmain.cpp" />
 90      <ClCompile Include="pch.cpp">
 91        <PrecompiledHeader Condition="'$(UsePrecompiledHeaders)' != 'false'">Create</PrecompiledHeader>
 92      </ClCompile>
 93    </ItemGroup>
 94    <ItemGroup>
 95      <ResourceCompile Include="Generated Files/ImageResizerContextMenu.rc" />
 96      <None Include="ImageResizerContextMenu.base.rc" />
 97    </ItemGroup>
 98    <ItemGroup>
 99      <None Include="packages.config" />
100    </ItemGroup>
101    <ItemGroup>
102      <None Include="Assets\ImageResizer\ImageResizer.ico">
103        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
104      </None>
105      <None Include="Assets\ImageResizer\LargeTile.png">
106        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
107      </None>
108      <None Include="Assets\ImageResizer\SmallTile.png">
109        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
110      </None>
111      <None Include="Assets\ImageResizer\SplashScreen.png">
112        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
113      </None>
114      <None Include="Assets\ImageResizer\Square150x150Logo.png">
115        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
116      </None>
117      <None Include="Assets\ImageResizer\Square44x44Logo.png">
118        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
119      </None>
120      <None Include="Assets\ImageResizer\storelogo.png">
121        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
122      </None>
123      <None Include="Assets\ImageResizer\Wide310x150Logo.png">
124        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
125      </None>
126    </ItemGroup>
127    <ItemGroup>
128      <ProjectReference Include="$(RepoRoot)src\common\logger\logger.vcxproj">
129        <Project>{d9b8fc84-322a-4f9f-bbb9-20915c47ddfd}</Project>
130      </ProjectReference>
131      <ProjectReference Include="$(RepoRoot)src\common\SettingsAPI\SettingsAPI.vcxproj">
132        <Project>{6955446d-23f7-4023-9bb3-8657f904af99}</Project>
133      </ProjectReference>
134      <ProjectReference Include="$(RepoRoot)src\common\Telemetry\EtwTrace\EtwTrace.vcxproj">
135        <Project>{8f021b46-362b-485c-bfba-ccf83e820cbd}</Project>
136      </ProjectReference>
137      <ProjectReference Include="..\ImageResizerLib\ImageResizerLib.vcxproj">
138        <Project>{18b3db45-4ffe-4d01-97d6-5223feee1853}</Project>
139      </ProjectReference>
140    </ItemGroup>
141    <ItemGroup>
142      <None Include="Resources.resx" />
143    </ItemGroup>
144    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
145    <Import Project="$(RepoRoot)deps\spdlog.props" />
146    <ImportGroup Label="ExtensionTargets">
147      <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')" />
148      <Import Project="$(RepoRoot)packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('$(RepoRoot)packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
149    </ImportGroup>
150    <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
151      <PropertyGroup>
152        <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>
153      </PropertyGroup>
154      <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'))" />
155      <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'))" />
156      <Error Condition="!Exists('$(RepoRoot)packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(RepoRoot)packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
157    </Target>
158  </Project>