diff options
| -rw-r--r-- | ports/protobuf/CONTROL | 2 | ||||
| -rw-r--r-- | ports/protobuf/portfile.cmake | 3 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_copy_tool_dependencies.cmake | 17 |
3 files changed, 14 insertions, 8 deletions
diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index f444ab67a..3b2a541bc 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,6 +1,6 @@ Source: protobuf Version: 3.12.3 -Port-Version: 1 +Port-Version: 2 Homepage: https://github.com/google/protobuf Description: Protocol Buffers - Google's data interchange format diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 4bfc11644..3b8f806cf 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -90,8 +90,7 @@ protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/share) if(CMAKE_HOST_WIN32) if(protobuf_BUILD_PROTOC_BINARIES) - file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + vcpkg_copy_tools(TOOL_NAMES protoc) else() file(COPY ${CURRENT_INSTALLED_DIR}/../x86-windows/tools/${PORT} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) endif() 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) |
