vcpkg_copy_tool_dependencies: show description how to install powershell (#16347)

This commit is contained in:
autoantwort 2021-04-01 19:39:35 +02:00 committed by GitHub
parent 6563298448
commit c02feb90c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,6 +23,9 @@ function(vcpkg_copy_tool_dependencies TOOL_DIR)
if (VCPKG_TARGET_IS_WINDOWS)
find_program(PWSH_EXE pwsh)
if (NOT PWSH_EXE)
if(UNIX AND NOT CYGWIN)
message(FATAL_ERROR "Could not find PowerShell Core; install PowerShell Core as described here: https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux")
endif()
message(FATAL_ERROR "Could not find PowerShell Core; please open an issue to report this.")
endif()
macro(search_for_dependencies PATH_TO_SEARCH)