|
100 | 100 | <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> |
101 | 101 | <Import Project="..\..\..\..\packages\cpprestsdk.v120.windesktop.msvcstl.dyn.rt-dyn.2.5.0\build\native\cpprestsdk.v120.windesktop.msvcstl.dyn.rt-dyn.targets" Condition="Exists('..\..\..\..\packages\cpprestsdk.v120.windesktop.msvcstl.dyn.rt-dyn.2.5.0\build\native\cpprestsdk.v120.windesktop.msvcstl.dyn.rt-dyn.targets')" /> |
102 | 102 | </ImportGroup> |
| 103 | + |
| 104 | + <Target Name="CreateVersionHeader" BeforeTargets="EnsureNuGetPackageBuildImports"> |
| 105 | + <PropertyGroup> |
| 106 | + <Revision>$(build_number)</Revision> |
| 107 | + <Revision Condition="'$(Revision)' == ''">0</Revision> |
| 108 | + </PropertyGroup> |
| 109 | + <ItemGroup> |
| 110 | + <VersionHeaderContents Include="// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved." /> |
| 111 | + <VersionHeaderContents Include="// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information." /> |
| 112 | + <VersionHeaderContents Include="%0a" /> |
| 113 | + <VersionHeaderContents Include="// This file is auto-generated" /> |
| 114 | + <VersionHeaderContents Include="%0a" /> |
| 115 | + <VersionHeaderContents Include="#define FileVersion $(SignalRClientCppVersionMajor),$(SignalRClientCppVersionMinor),$(SignalRClientCppVersionPatch),$(Revision)" /> |
| 116 | + <VersionHeaderContents Include="#define FileVersionStr "$(SignalRClientCppVersionMajor).$(SignalRClientCppVersionMinor).$(SignalRClientCppVersionPatch).$(Revision)\0"" /> |
| 117 | + <VersionHeaderContents Include="#define ProductVersion $(SignalRClientCppVersionMajor),$(SignalRClientCppVersionMinor),$(SignalRClientCppVersionPatch),$(Revision)" /> |
| 118 | + <VersionHeaderContents Include="#define ProductVersionStr "$(SignalRClientCppVersionString)\0"" /> |
| 119 | + </ItemGroup> |
| 120 | + <WriteLinesToFile File="..\..\version.h" Lines="@(VersionHeaderContents)" OverWrite="true" /> |
| 121 | + </Target> |
| 122 | + |
103 | 123 | <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
104 | 124 | <PropertyGroup> |
105 | 125 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
|
0 commit comments