Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions recipes/grpc/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ class GrpcConan(ConanFile):

_target_info = None

@property
def _is_clang_cl(self):
return self.settings.compiler == "clang" and self.settings.os == "Windows"

@property
def _grpc_plugin_template(self):
return "grpc_plugin_template.cmake.in"
Expand Down Expand Up @@ -214,6 +218,11 @@ def generate(self):
# workaround for: install TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE executable
tc.cache_variables["CMAKE_MACOSX_BUNDLE"] = False

if is_msvc(self) or self._is_clang_cl:
runtime = self.settings.get_safe("compiler.runtime")
if runtime:
tc.cache_variables["grpc_MSVC_STATIC_RUNTIME"] = runtime == "static"

if self._supports_libsystemd:
tc.cache_variables["gRPC_USE_SYSTEMD"] = self.options.with_libsystemd

Expand Down