summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWes Haggard <Wes.Haggard@microsoft.com>2017-10-24 16:38:17 -0700
committerWes Haggard <Wes.Haggard@microsoft.com>2017-10-30 13:05:18 -0700
commit8ae6fc3ac908d7b979dd1cbaa90a1f044a5c7041 (patch)
treed681c9e47c5d26460c9c5f40ece16399b32ad361
parentf75e211ded5c832611f140c0f4ed710425c73772 (diff)
downloadcoreclr-8ae6fc3ac908d7b979dd1cbaa90a1f044a5c7041.tar.gz
coreclr-8ae6fc3ac908d7b979dd1cbaa90a1f044a5c7041.tar.bz2
coreclr-8ae6fc3ac908d7b979dd1cbaa90a1f044a5c7041.zip
Pass overridden packages directory to CMake
-rw-r--r--CMakeLists.txt2
-rwxr-xr-xbuild-packages.sh2
-rw-r--r--build.cmd3
-rwxr-xr-xbuild.sh4
4 files changed, 6 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a48ef765cc..9a721dcc74 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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
diff --git a/build-packages.sh b/build-packages.sh
index ed4dec9643..4de98e6db3 100755
--- a/build-packages.sh
+++ b/build-packages.sh
@@ -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
diff --git a/build.cmd b/build.cmd
index 62e503d289..4316d61d45 100644
--- a/build.cmd
+++ b/build.cmd
@@ -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="
diff --git a/build.sh b/build.sh
index ad4a6e17a1..cbb2c8e4a4 100755
--- a/build.sh
+++ b/build.sh
@@ -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
@@ -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=