diff options
author | Jose Perez Rodriguez <joperezr@microsoft.com> | 2016-04-04 16:59:41 -0700 |
---|---|---|
committer | Jose Perez Rodriguez <joperezr@microsoft.com> | 2016-04-06 13:26:41 -0700 |
commit | 4d8437406e3edb3b337385d68d4d24631453c771 (patch) | |
tree | 4d0544f795f71bd5033b2860bf6b71e8c9b9a4a9 | |
parent | bd05196930765de1e2ce2518904be1357128a578 (diff) | |
download | coreclr-4d8437406e3edb3b337385d68d4d24631453c771.tar.gz coreclr-4d8437406e3edb3b337385d68d4d24631453c771.tar.bz2 coreclr-4d8437406e3edb3b337385d68d4d24631453c771.zip |
Adding Common versioning to managed and Native components of coreclr
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | build.cmd | 3 | ||||
-rw-r--r-- | dir.props | 4 | ||||
-rw-r--r-- | src/mscorlib/mscorlib.csproj | 2 | ||||
-rw-r--r-- | src/pal/prebuilt/inc/fxver.rc | 4 |
5 files changed, 13 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d301a86622..5c86e4e293 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -698,6 +698,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") @@ -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 ( @@ -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" /> diff --git a/src/mscorlib/mscorlib.csproj b/src/mscorlib/mscorlib.csproj index 8a1c0b4740..271487b999 100644 --- a/src/mscorlib/mscorlib.csproj +++ b/src/mscorlib/mscorlib.csproj @@ -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)" /> diff --git a/src/pal/prebuilt/inc/fxver.rc b/src/pal/prebuilt/inc/fxver.rc index 0ede4c8908..a341041309 100644 --- a/src/pal/prebuilt/inc/fxver.rc +++ b/src/pal/prebuilt/inc/fxver.rc @@ -31,6 +31,10 @@ /* */ /*---------------------------------------------------------------*/ +#ifdef _WIN32 +#include <_version.h> +#endif //_WIN32 + #ifdef RC_INVOKED VS_VERSION_INFO VERSIONINFO |