aboutsummaryrefslogtreecommitdiff
path: root/scripts/cmake
diff options
context:
space:
mode:
authorBilly O'Neal <bion@microsoft.com>2020-11-01 17:12:49 -0800
committerGitHub <noreply@github.com>2020-11-01 17:12:49 -0800
commitb7056e9f1f34f18b6648b1f1d9c4e9d31f04e91c (patch)
tree75e127191e18904a09c9b5213521c75761d801df /scripts/cmake
parente9ff3cd5a04cd0e8122ff56e9873985ff71aa3ca (diff)
downloadvcpkg-b7056e9f1f34f18b6648b1f1d9c4e9d31f04e91c.tar.gz
vcpkg-b7056e9f1f34f18b6648b1f1d9c4e9d31f04e91c.zip
[vcpkg] Fix incorrect determination of PowerShell not found (#14317)
* Fix incorrect determination of PowerShell not found because Bill doesn't know enough CMake :( Resolves #14283
Diffstat (limited to 'scripts/cmake')
-rw-r--r--scripts/cmake/vcpkg_copy_tool_dependencies.cmake16
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake
index 681c80461..74815eec5 100644
--- a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake
+++ b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake
@@ -18,22 +18,22 @@
## * [fltk](https://github.com/Microsoft/vcpkg/blob/master/ports/fltk/portfile.cmake)
function(vcpkg_copy_tool_dependencies TOOL_DIR)
find_program(PWSH_EXE pwsh)
- if (PWSH_EXE-NOTFOUND)
+ if (NOT PWSH_EXE)
message(FATAL_ERROR "Could not find PowerShell Core; please open an issue to report this.")
endif()
macro(search_for_dependencies PATH_TO_SEARCH)
- file(GLOB TOOLS ${TOOL_DIR}/*.exe ${TOOL_DIR}/*.dll)
- foreach(TOOL ${TOOLS})
+ file(GLOB TOOLS "${TOOL_DIR}/*.exe" "${TOOL_DIR}/*.dll")
+ foreach(TOOL IN LISTS TOOLS)
vcpkg_execute_required_process(
COMMAND "${PWSH_EXE}" -noprofile -executionpolicy Bypass -nologo
-file "${SCRIPTS}/buildsystems/msbuild/applocal.ps1"
- -targetBinary ${TOOL}
- -installedDir ${PATH_TO_SEARCH}
- WORKING_DIRECTORY ${VCPKG_ROOT_DIR}
+ -targetBinary "${TOOL}"
+ -installedDir "${PATH_TO_SEARCH}"
+ WORKING_DIRECTORY "${VCPKG_ROOT_DIR}"
LOGNAME copy-tool-dependencies
)
endforeach()
endmacro()
- search_for_dependencies(${CURRENT_PACKAGES_DIR}/bin)
- search_for_dependencies(${CURRENT_INSTALLED_DIR}/bin)
+ search_for_dependencies("${CURRENT_PACKAGES_DIR}/bin")
+ search_for_dependencies("${CURRENT_INSTALLED_DIR}/bin")
endfunction()