Browse Source

Check if CMake is accessible before trying to invoke it.

The default option in CMake's installer is to not install itself into the path.  Our directions on http://h-uru.github.io/Plasma/ remind the user to select the correct option, but they may overlook this, and be faced with an error running this script.  Adding a specific message here during this case will help guide them to self-fixing the problem.
Joseph Davies 10 years ago
parent
commit
b3488242f8
  1. 5
      prepare_env.ps1

5
prepare_env.ps1

@ -26,8 +26,13 @@ if (!(Test-Path -PathType Container devlibs)) {
Write-Host "OK" -foregroundColor Green
}
if(Get-ChildItem Env:PATH | Where-Object {$_.Value -match "CMake"}) {
Write-Host "Running CMake to configure build system... "
cmake -DCMAKE_INSTALL_PREFIX=devlibs -DPLASMA_BUILD_TOOLS=OFF -DPLASMA_BUILD_RESOURCE_DAT=OFF -G "Visual Studio 12" ..
} else {
Write-Host "CMake not found in PATH."
Write-Host "Please run the CMake installer and select the option to add CMake to your system PATH."
}
if ($Host.Name -eq "ConsoleHost") {
Write-Host ""

Loading…
Cancel
Save