Skip to content

Commit

Permalink
Pass overridden packages directory to CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
weshaggard committed Oct 30, 2017
1 parent f75e211 commit 8ae6fc3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ endif (CLR_CMAKE_PLATFORM_UNIX)

# Microsoft.Dotnet.BuildTools.Coreclr version
set(BuildToolsVersion "1.0.4-prerelease")
set(BuildToolsDir "${CLR_DIR}/packages/Microsoft.DotNet.BuildTools.CoreCLR/${BuildToolsVersion}")
set(BuildToolsDir "${CLR_CMAKE_PACKAGES_DIR}/Microsoft.DotNet.BuildTools.CoreCLR/${BuildToolsVersion}")

#------------------------------
# Add Product Directory
Expand Down
2 changes: 1 addition & 1 deletion build-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ initHostDistroRid()
if [ "$__HostOS" == "Linux" ]; then
if [ -e /etc/os-release ]; then
source /etc/os-release
if [[ $ID == "alpine" || $ID == "rhel"]]; then
if [[ $ID == "alpine" || $ID == "rhel" ]]; then
# remove the last version digit
VERSION_ID=${VERSION_ID%.*}
fi
Expand Down
3 changes: 2 additions & 1 deletion build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ set "__ProjectDir=%~dp0"
if %__ProjectDir:~-1%==\ set "__ProjectDir=%__ProjectDir:~0,-1%"
set "__ProjectFilesDir=%__ProjectDir%"
set "__SourceDir=%__ProjectDir%\src"
set "__PackagesDir=%__ProjectDir%\packages"
set "__PackagesDir=%DotNetRestorePackagesPath%"
if [%__PackagesDir%]==[] set "__PackagesDir=%__ProjectDir%\packages"
set "__RootBinDir=%__ProjectDir%\bin"
set "__LogsDir=%__RootBinDir%\Logs"
set "__PgoOptDataVersion="
Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ initHostDistroRid()
if [ "$__HostOS" == "Linux" ]; then
if [ -e /etc/os-release ]; then
source /etc/os-release
if [[ $ID == "alpine" || $ID == "rhel"]]; then
if [[ $ID == "alpine" || $ID == "rhel" ]]; then
# remove the last version digit
VERSION_ID=${VERSION_ID%.*}
fi
Expand Down Expand Up @@ -621,7 +621,7 @@ __IgnoreWarnings=0
# Set the various build properties here so that CMake and MSBuild can pick them up
__ProjectDir="$__ProjectRoot"
__SourceDir="$__ProjectDir/src"
__PackagesDir="$__ProjectDir/packages"
__PackagesDir="${DotNetRestorePackagesPath:-${__ProjectDir}/packages}"
__RootBinDir="$__ProjectDir/bin"
__UnprocessedBuildArgs=
__RunArgs=
Expand Down

0 comments on commit 8ae6fc3

Please sign in to comment.