aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>2020-08-10 15:40:21 -0700
committerGitHub <noreply@github.com>2020-08-10 15:40:21 -0700
commit634c1043b01dff682dc9834f4987037683764034 (patch)
tree659c672a21ab7e9142b6e0a66f07956fe8e53db0 /scripts
parent92f6eb402afbf32dcc8d4083ccb5ae01dcf10881 (diff)
downloadvcpkg-634c1043b01dff682dc9834f4987037683764034.tar.gz
vcpkg-634c1043b01dff682dc9834f4987037683764034.zip
[vcpkg_copy_tool_dependencies] Use vcpkg internal powershell (#12776)
* Use vcpkg internal powershell * [protobuf] change vcpkg_copy_tool_dependencies to vcpkg_copy_tools
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_copy_tool_dependencies.cmake17
1 files changed, 12 insertions, 5 deletions
diff --git a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake
index 396d20b41..1784a4d14 100644
--- a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake
+++ b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake
@@ -17,14 +17,21 @@
## * [glib](https://github.com/Microsoft/vcpkg/blob/master/ports/glib/portfile.cmake)
## * [fltk](https://github.com/Microsoft/vcpkg/blob/master/ports/fltk/portfile.cmake)
function(vcpkg_copy_tool_dependencies TOOL_DIR)
+ find_program(PS_EXE powershell PATHS ${DOWNLOADS}/tool)
+ if (PS_EXE-NOTFOUND)
+ message(FATAL_ERROR "Could not find powershell in vcpkg tools, 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})
- execute_process(COMMAND powershell -noprofile -executionpolicy Bypass -nologo
- -file ${SCRIPTS}/buildsystems/msbuild/applocal.ps1
- -targetBinary ${TOOL}
- -installedDir ${PATH_TO_SEARCH}
- OUTPUT_VARIABLE OUT)
+ vcpkg_execute_required_process(
+ COMMAND ${PS_EXE} -noprofile -executionpolicy Bypass -nologo
+ -file ${SCRIPTS}/buildsystems/msbuild/applocal.ps1
+ -targetBinary ${TOOL}
+ -installedDir ${PATH_TO_SEARCH}
+ WORKING_DIRECTORY ${VCPKG_ROOT_DIR}
+ LOGNAME copy-tool-dependencies
+ )
endforeach()
endmacro()
search_for_dependencies(${CURRENT_PACKAGES_DIR}/bin)