diff --git a/conanfile.py b/conanfile.py index 45eaad6b8..864ce9ba0 100644 --- a/conanfile.py +++ b/conanfile.py @@ -47,14 +47,24 @@ def requirements(self): # The SDK supports older grpc and protobuf, but these are the oldest # maintained conan packages. - self.requires('grpc/[>=1.48.4]') - self.requires('protobuf/[>=3.17.1]') - self.requires('xtensor/[>=0.24.3]', transitive_headers=True) + self.requires('protobuf/5.27.0') + + if self.settings.compiler.cppstd in ["14", "gnu14"]: + self.requires('grpc/[>=1.48.4 <1.70.0]') + self.requires('xtensor/[>=0.24.3 <0.26.0]', transitive_headers=True) + else: + self.requires('grpc/[>=1.48.4]') + self.requires('xtensor/[>=0.24.3]', transitive_headers=True) + def build_requirements(self): if self.options.offline_proto_generation: - self.tool_requires('grpc/[>=1.48.4]') - self.tool_requires('protobuf/[>=3.17.1]') + if self.settings.compiler.cppstd in ["14", "gnu14"]: + self.tool_requires('grpc/[>=1.48.4 <1.70.0]') + else: + self.tool_requires('grpc/[>=1.48.4]') + + self.tool_requires('protobuf/5.27.0') def layout(self): cmake_layout(self)