Skip to content

Commit

Permalink
don't try to build exteral/googleapis as shared on win
Browse files Browse the repository at this point in the history
  • Loading branch information
h-vetinari committed Aug 31, 2022
1 parent 58fd82b commit 6403358
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 87908262e50b189f782589fe0cae5ac3927d1c47 Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <h.vetinari@gmx.com>
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

0 comments on commit 6403358

Please sign in to comment.