aboutsummaryrefslogtreecommitdiff
path: root/scripts/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/cmake')
-rw-r--r--scripts/cmake/vcpkg_common_functions.cmake1
-rw-r--r--scripts/cmake/vcpkg_copy_tool_dependencies.cmake16
2 files changed, 17 insertions, 0 deletions
diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake
index ff1fae953..6e60bf2bc 100644
--- a/scripts/cmake/vcpkg_common_functions.cmake
+++ b/scripts/cmake/vcpkg_common_functions.cmake
@@ -11,3 +11,4 @@ include(vcpkg_configure_cmake)
include(vcpkg_configure_qmake)
include(vcpkg_apply_patches)
include(vcpkg_copy_pdbs)
+include(vcpkg_copy_tool_dependencies)
diff --git a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake
new file mode 100644
index 000000000..432e3c12a
--- /dev/null
+++ b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake
@@ -0,0 +1,16 @@
+# Copy dlls for all tools in TOOL_DIR
+
+function(vcpkg_copy_tool_dependencies TOOL_DIR)
+ 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 UnRestricted -nologo
+ -file ${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/applocal.ps1
+ -targetBinary ${TOOL}
+ -installedDir ${PATH_TO_SEARCH}
+ OUTPUT_VARIABLE OUT)
+ endforeach()
+ endmacro()
+ search_for_dependencies(${CURRENT_PACKAGES_DIR}/bin)
+ search_for_dependencies(${CURRENT_INSTALLED_DIR}/bin)
+endfunction()