aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBilly O'Neal <bion@microsoft.com>2020-11-03 12:04:27 -0800
committerGitHub <noreply@github.com>2020-11-03 12:04:27 -0800
commit2484d583616c018963679a74e96f59082ae25f95 (patch)
tree01168a2bf2fe2abf6c57f1df727fafaf3e7bf1ee /scripts
parent0bf3923f9fab4001c00f0f429682a0853b5749e0 (diff)
downloadvcpkg-2484d583616c018963679a74e96f59082ae25f95.tar.gz
vcpkg-2484d583616c018963679a74e96f59082ae25f95.zip
[vcpkg] Disable vcpkg_copy_tool_dependencies on non-Windows (#14366)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_copy_tool_dependencies.cmake38
1 files changed, 20 insertions, 18 deletions
diff --git a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake
index 74815eec5..63e9b6fb1 100644
--- a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake
+++ b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake
@@ -17,23 +17,25 @@
## * [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(PWSH_EXE pwsh)
- if (NOT PWSH_EXE)
- message(FATAL_ERROR "Could not find PowerShell Core; please open an issue to report this.")
+ if (VCPKG_TARGET_IS_WINDOWS)
+ find_program(PWSH_EXE pwsh)
+ 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 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}"
+ LOGNAME copy-tool-dependencies
+ )
+ endforeach()
+ endmacro()
+ search_for_dependencies("${CURRENT_PACKAGES_DIR}/bin")
+ search_for_dependencies("${CURRENT_INSTALLED_DIR}/bin")
endif()
- macro(search_for_dependencies PATH_TO_SEARCH)
- 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}"
- LOGNAME copy-tool-dependencies
- )
- endforeach()
- endmacro()
- search_for_dependencies("${CURRENT_PACKAGES_DIR}/bin")
- search_for_dependencies("${CURRENT_INSTALLED_DIR}/bin")
endfunction()