From c0890d7276f8a999e2e0914de617755ecb302cb0 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Fri, 7 Jul 2017 16:29:57 +0300 Subject: [grpc] Fix missing dll's for grpc_cpp_plugin --- ports/grpc/portfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 3397e86dc..1da3735cc 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -60,6 +60,11 @@ file(GLOB TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.exe") if(TOOLS) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/grpc) file(COPY ${TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/grpc) + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(COPY ${CURRENT_INSTALLED_DIR}/bin/libprotobuf.dll DESTINATION ${CURRENT_PACKAGES_DIR}/tools/grpc) + file(COPY ${CURRENT_INSTALLED_DIR}/bin/libprotoc.dll DESTINATION ${CURRENT_PACKAGES_DIR}/tools/grpc) + file(COPY ${CURRENT_INSTALLED_DIR}/bin/zlib1.dll DESTINATION ${CURRENT_PACKAGES_DIR}/tools/grpc) + endif() endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) -- cgit v1.2.3 From 4267c86b1f7cfe20e88fe7a1eaaa4caaca8c5d77 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 7 Jul 2017 17:19:19 -0700 Subject: [grpc] Use vcpkg_copy_tool_dependencies --- ports/grpc/CONTROL | 2 +- ports/grpc/portfile.cmake | 6 +----- toolsrc/src/PostBuildLint.cpp | 14 +++++++------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 8298a047c..280342f61 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.4.0 +Version: 1.4.0-1 Build-Depends: zlib, openssl, protobuf, c-ares Description: An RPC library and framework \ No newline at end of file diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 1da3735cc..1c2f4b7f2 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -60,11 +60,7 @@ file(GLOB TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.exe") if(TOOLS) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/grpc) file(COPY ${TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/grpc) - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(COPY ${CURRENT_INSTALLED_DIR}/bin/libprotobuf.dll DESTINATION ${CURRENT_PACKAGES_DIR}/tools/grpc) - file(COPY ${CURRENT_INSTALLED_DIR}/bin/libprotoc.dll DESTINATION ${CURRENT_PACKAGES_DIR}/tools/grpc) - file(COPY ${CURRENT_INSTALLED_DIR}/bin/zlib1.dll DESTINATION ${CURRENT_PACKAGES_DIR}/tools/grpc) - endif() + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/grpc) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index 82d50a68f..8e11ae5b1 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -775,15 +775,15 @@ namespace vcpkg::PostBuildLint error_count += check_lib_architecture(pre_build_info.target_architecture, libs); } + std::vector debug_dlls = fs.get_files_recursive(debug_bin_dir); + Util::unstable_keep_if(debug_dlls, has_extension_pred(fs, ".dll")); + std::vector release_dlls = fs.get_files_recursive(release_bin_dir); + Util::unstable_keep_if(release_dlls, has_extension_pred(fs, ".dll")); + switch (build_info.library_linkage) { case Build::LinkageType::DYNAMIC: { - std::vector debug_dlls = fs.get_files_recursive(debug_bin_dir); - Util::unstable_keep_if(debug_dlls, has_extension_pred(fs, ".dll")); - std::vector release_dlls = fs.get_files_recursive(release_bin_dir); - Util::unstable_keep_if(release_dlls, has_extension_pred(fs, ".dll")); - error_count += check_matching_debug_and_release_binaries(debug_dlls, release_dlls); error_count += check_lib_files_are_available_if_dlls_are_available( @@ -804,8 +804,8 @@ namespace vcpkg::PostBuildLint } case Build::LinkageType::STATIC: { - std::vector dlls = fs.get_files_recursive(package_dir); - Util::unstable_keep_if(dlls, has_extension_pred(fs, ".dll")); + auto dlls = release_dlls; + dlls.insert(dlls.end(), debug_dlls.begin(), debug_dlls.end()); error_count += check_no_dlls_present(dlls); error_count += check_bin_folders_are_not_present_in_static_build(fs, package_dir); -- cgit v1.2.3