aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_configure_cmake.cmake4
-rw-r--r--scripts/findVisualStudioInstallationInstances.ps113
2 files changed, 12 insertions, 5 deletions
diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake
index 128782075..5db9b5d05 100644
--- a/scripts/cmake/vcpkg_configure_cmake.cmake
+++ b/scripts/cmake/vcpkg_configure_cmake.cmake
@@ -2,6 +2,10 @@ find_program(vcpkg_configure_cmake_NINJA ninja)
function(vcpkg_configure_cmake)
cmake_parse_arguments(_csc "" "SOURCE_PATH;GENERATOR" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN})
+ if(NOT VCPKG_PLATFORM_TOOLSET)
+ message(FATAL_ERROR "Vcpkg has been updated with VS2017 support, however you need to rebuild vcpkg.exe by re-running bootstrap.ps1\n powershell -exec bypass scripts\\bootstrap.ps1\n")
+ endif()
+
if(_csc_GENERATOR)
set(GENERATOR ${_csc_GENERATOR})
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1
index d5faa57d3..a2ce66522 100644
--- a/scripts/findVisualStudioInstallationInstances.ps1
+++ b/scripts/findVisualStudioInstallationInstances.ps1
@@ -32,9 +32,12 @@ if (!(Test-Path $SetupConsoleExe))
throw $nugetOutput
}
-$consoleOutput = & $SetupConsoleExe 2>&1
+$instances = & $SetupConsoleExe -nologo -value InstallationPath 2>&1
+$instanceCount = $instances.Length
+# The last item can be empty
+if ($instances[$entryCount - 1] -eq "")
+{
+ $instances = $instances[0..($instanceCount - 2)]
+}
-$key = "InstallationPath = "
-$paths = $consoleOutput | Select-String -SimpleMatch $key
-$paths = $paths -replace $key, ""
-return $paths \ No newline at end of file
+return $instances