From c31a643f99cfdc94a39d2c741a408f848f34ceff Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 31 Aug 2022 19:02:53 +0200 Subject: [PATCH] don't try to build exteral/googleapis as shared on win --- recipe/meta.yaml | 3 +++ ...-build-external-googleapis-as-shared.patch | 27 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 recipe/patches/0001-do-not-try-to-build-external-googleapis-as-shared.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d4fa5a3..a808a3c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -8,6 +8,9 @@ package: source: url: https://github.com/googleapis/{{ name }}/archive/v{{ version }}.tar.gz sha256: 168c38219feb5a2c6b81bec5960cd067f6cda3daa83cd9761fa04f27d2b78f17 + patches: + # don't try to build the protobuf-heavy googleapis as shared on win + - patches/0001-do-not-try-to-build-external-googleapis-as-shared.patch # [win] build: number: 1 diff --git a/recipe/patches/0001-do-not-try-to-build-external-googleapis-as-shared.patch b/recipe/patches/0001-do-not-try-to-build-external-googleapis-as-shared.patch new file mode 100644 index 0000000..ce8a04a --- /dev/null +++ b/recipe/patches/0001-do-not-try-to-build-external-googleapis-as-shared.patch @@ -0,0 +1,27 @@ +From 87908262e50b189f782589fe0cae5ac3927d1c47 Mon Sep 17 00:00:00 2001 +From: "H. Vetinari" +Date: Wed, 31 Aug 2022 19:00:34 +0200 +Subject: [PATCH] do not try to build external/googleapis as shared + +--- + CMakeLists.txt | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 64e60a8d..4fa7a7c4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -251,7 +251,10 @@ find_package(absl CONFIG REQUIRED) + if (${GOOGLE_CLOUD_CPP_ENABLE_GRPC}) + find_package(gRPC REQUIRED QUIET) + find_package(ProtobufWithTargets REQUIRED QUIET) ++ # do not try to build googleapis shared on windows ++ set(BUILD_SHARED_LIBS OFF) + add_subdirectory(external/googleapis) ++ set(BUILD_SHARED_LIBS ON) + endif () + + # The only case where REST support is not needed is when not compiling services +-- +2.37.0.windows.1 +