Skip to content

Commit

Permalink
Merge pull request dotnet#4078 from joperezr/AddVersioningInOpenBuilds
Browse files Browse the repository at this point in the history
Adding Common versioning to managed and Native components of coreclr
  • Loading branch information
joperezr committed Apr 6, 2016
2 parents 0a88545 + 4d84374 commit ce7e02e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ set(CMAKE_CXX_STANDARD_LIBRARIES "") # do not link against standard win32 libs i

# Include the basic prebuilt headers - required for getting fileversion resource details.
include_directories("src/pal/prebuilt/inc")
include_directories("bin/obj")

if (CLR_CMAKE_PLATFORM_UNIX)
include_directories("src/pal/inc")
Expand Down
3 changes: 3 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ REM === Start the build steps
REM ===
REM =========================================================================================

:: Generate _version.h
if exist "%__RootBinDir%\obj\_version.h" del "%__RootBinDir%\obj\_version.h"
%_msbuildexe% "%__ProjectFilesDir%\build.proj" /t:GenerateVersionHeader /p:NativeVersionHeaderFile="%__RootBinDir%\obj\_version.h" /p:GenerateVersionHeader=true
if defined __MscorlibOnly goto PerformMScorlibBuild

if defined __SkipNativeBuild (
Expand Down
4 changes: 3 additions & 1 deletion dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,13 @@

<!-- Output paths -->
<PropertyGroup>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(RootBinDir)obj</BaseIntermediateOutputPath>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(RootBinDir)obj/</BaseIntermediateOutputPath>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(BaseIntermediateOutputPath)\$(BuildOS).$(BuildArch).$(BuildType)</IntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)' == ''">$(BaseIntermediateOutputPath)\$(BuildOS).$(BuildArch).$(BuildType)</OutputPath>
<FinalOutputPath Condition="'$(FinalOutputPath)' == ''">$(BinDir)</FinalOutputPath>
</PropertyGroup>

<Import Condition="Exists('$(ToolsDir)BuildVersion.targets')" Project="$(ToolsDir)BuildVersion.targets" />

<!-- Import Build tools common props file where repo-independent properties are found -->
<Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />
Expand Down
2 changes: 2 additions & 0 deletions src/mscorlib/mscorlib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)Tools\Versioning\GenerateVersionInfo.targets"/>
<!-- Override versioning targets -->
<Import Project="$(ToolsDir)versioning.targets" />
<Import Project="GenerateSplitStringResources.targets"/>
<Import Project="GenerateCompilerResponseFile.targets"/>
<Import Project="$(PostProcessingToolsPath)" />
Expand Down
4 changes: 4 additions & 0 deletions src/pal/prebuilt/inc/fxver.rc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
/* */
/*---------------------------------------------------------------*/

#ifdef _WIN32
#include <_version.h>
#endif //_WIN32

#ifdef RC_INVOKED

VS_VERSION_INFO VERSIONINFO
Expand Down

0 comments on commit ce7e02e

Please sign in to comment.