msbuild: simplify lang/scm projects a bit

This commit is contained in:
Shawn Hoffman 2022-04-27 11:37:50 -07:00
parent cad1f2735c
commit 2808909a97
2 changed files with 11 additions and 42 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project>
<Import Project="..\Source\VSProps\Base.Macros.props" /> <Import Project="..\Source\VSProps\Base.Macros.props" />
<Import Project="$(VSPropsDir)Base.Targets.props" /> <Import Project="$(VSPropsDir)Base.Targets.props" />
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
@ -24,7 +24,7 @@
<MoFiles Include="@(PoFiles -> '$(OutDir)%(Filename).mo')" /> <MoFiles Include="@(PoFiles -> '$(OutDir)%(Filename).mo')" />
<MoFilesDst Include="@(MoFiles -> '$(BinaryOutputDir)Languages\%(Filename)%(Extension)')" /> <MoFilesDst Include="@(MoFiles -> '$(BinaryOutputDir)Languages\%(Filename)%(Extension)')" />
</ItemGroup> </ItemGroup>
<Target Name="MsgFmtCompile" BeforeTargets="Midl" AfterTargets="CustomBuild" Inputs="@(PoFiles)" Outputs="@(MoFiles)"> <Target Name="MsgFmtCompile" BeforeTargets="BuildGenerateSources" Inputs="@(PoFiles)" Outputs="@(MoFiles)">
<Exec Command='$(msgfmt) -o "$(OutDir)%(PoFiles.Filename).mo" "@(PoFiles)"' /> <Exec Command='$(msgfmt) -o "$(OutDir)%(PoFiles.Filename).mo" "@(PoFiles)"' />
</Target> </Target>
<Target Name="MsgFmtCopy" AfterTargets="MsgFmtCompile" Inputs="@(MoFiles)" Outputs="@(MoFilesDst)"> <Target Name="MsgFmtCopy" AfterTargets="MsgFmtCompile" Inputs="@(MoFiles)" Outputs="@(MoFilesDst)">

View File

@ -1,60 +1,29 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project>
<ItemGroup Label="ProjectConfigurations"> <Import Project="..\..\VSProps\Base.Macros.props" />
<ProjectConfiguration Include="Debug|ARM64"> <Import Project="$(VSPropsDir)Base.Targets.props" />
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{41279555-F94F-4EBC-99DE-AF863C10C5C4}</ProjectGuid> <ProjectGuid>{41279555-F94F-4EBC-99DE-AF863C10C5C4}</ProjectGuid>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration"> <Import Project="$(VSPropsDir)Configuration.Utility.props" />
<ConfigurationType>Utility</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets"> <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\VSProps\Base.props" /> <Import Project="$(VSPropsDir)Base.props" />
</ImportGroup> </ImportGroup>
<!-- <Target Name="GenerateScmRevHeader" BeforeTargets="BuildGenerateSources" Outputs="scmrev.h">
OutDir is always created, which is annoying for SCMRevGen as it doesn't really have an outdir. <Exec Command="$(CScript) /nologo /E:JScript make_scmrev.h.js" />
Here it's redirected to some other place to hide the annoyance. </Target>
-->
<PropertyGroup>
<OutDir>$(BuildRootDir)</OutDir>
</PropertyGroup>
<!-- <!--
DisableFastUpToDateCheck bypasses Visual Studio's build manager and forces MSBuild to be run DisableFastUpToDateCheck bypasses Visual Studio's build manager and forces MSBuild to be run
on the project. This allows our PreBuildEvent to be run by MSBuild even if VS thinks things on the project. This is only needed for VS-initiated builds, not msbuild itself.
are up-to-date.
--> -->
<PropertyGroup> <PropertyGroup>
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck> <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup>
<PreBuildEvent>
<Command>"$(CScript)" /nologo /E:JScript "make_scmrev.h.js"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<None Include="make_scmrev.h.js" /> <None Include="make_scmrev.h.js" />
</ItemGroup> </ItemGroup>