2017-01-14 09:59:41 +08:00
|
|
|
# Copy dlls for all tools in TOOL_DIR
|
2017-01-12 04:20:53 +08:00
|
|
|
|
2017-01-14 09:59:41 +08:00
|
|
|
function(vcpkg_copy_tool_dependencies TOOL_DIR)
|
2017-01-12 04:20:53 +08:00
|
|
|
macro(search_for_dependencies PATH_TO_SEARCH)
|
2017-01-14 09:59:41 +08:00
|
|
|
file(GLOB TOOLS ${TOOL_DIR}/*.exe ${TOOL_DIR}/*.dll)
|
2017-01-12 04:20:53 +08:00
|
|
|
foreach(TOOL ${TOOLS})
|
2017-04-09 09:53:39 +08:00
|
|
|
execute_process(COMMAND powershell -noprofile -executionpolicy Bypass -nologo
|
2017-01-12 04:20:53 +08:00
|
|
|
-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()
|