Fixing powershell.exe lib paths and more thoroughly cleaning the powershell-native directory (#2758)

This commit is contained in:
Mike Richmond
2016-11-21 16:55:03 -08:00
committed by Dongbo Wang
parent 20a0ba041c
commit cac96e5fc9
2 changed files with 16 additions and 9 deletions
+5
View File
@@ -120,6 +120,11 @@ function Start-PSBuild {
Push-Location $PSScriptRoot
try {
git clean -fdX
# Extra cleaning is required to delete the CMake temporary files.
# These are not cleaned when using "X" and cause CMake to retain state, leading to
# mis-configured environment issues when switching between x86 and x64 compilation
# environments.
git clean -fdx .\src\powershell-native
} finally {
Pop-Location
}
@@ -20,16 +20,18 @@ if (BUILD_ONECORE)
#
# Configure lib directories so that CI picks up onecore.lib
#
SET (WindowsSdkDir $ENV{WindowsSdkDir})
SET (WindowsSDKVersion $ENV{WindowsSDKVersion})
SET (WindowsSDKLibBase "${WindowsSdkDir}/Lib/${WindowsSDKVersion}")
SET (OneCoreLibBase "$ENV{VCInstallDir}lib/onecore/amd64")
if (BUILD_ARCH_AMD64)
SET (WindowsSdkDir $ENV{WindowsSdkDir})
SET (WindowsSDKVersion $ENV{WindowsSDKVersion})
SET (WindowsSDKLibBase "${WindowsSdkDir}/Lib/${WindowsSDKVersion}")
SET (OneCoreLibBase "$ENV{VCInstallDir}lib/onecore/amd64")
SET (LibraryPath)
list (APPEND LibraryPath "${OneCoreLibBase}")
list (APPEND LibraryPath "${WindowsSDKLibBase}ucrt/${WindowsSDKPlatform}")
list (APPEND LibraryPath "${WindowsSDKLibBase}um/${WindowsSDKPlatform}" )
link_directories(${LibraryPath})
SET (LibraryPath)
list (APPEND LibraryPath "${OneCoreLibBase}")
list (APPEND LibraryPath "${WindowsSDKLibBase}ucrt/${WindowsSDKPlatform}")
list (APPEND LibraryPath "${WindowsSDKLibBase}um/${WindowsSDKPlatform}" )
link_directories(${LibraryPath})
endif ()
else ()
# Settings to use when creating PowerShell.exe for Windows on full SKUs or downlevel platforms