Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OpenCV] Make the protobuf version a property #7437

Merged
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
8 changes: 6 additions & 2 deletions recipes/opencv/4.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ def _has_with_jpeg2000_option(self):
def _has_with_tiff_option(self):
return self.settings.os != "iOS"

@property
def _protobuf_version(self):
return "protobuf/3.17.1"

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
Expand Down Expand Up @@ -163,7 +167,7 @@ def requirements(self):
if self.options.get_safe("with_gtk"):
self.requires("gtk/system")
if self.options.dnn:
self.requires("protobuf/3.17.1")
self.requires(self._protobuf_version)
if self.options.with_ade:
self.requires("ade/0.1.1f")

Expand All @@ -178,7 +182,7 @@ def validate(self):

def build_requirements(self):
if self.options.dnn and hasattr(self, "settings_build"):
self.build_requires("protobuf/3.17.1")
self.build_requires(self._protobuf_version)

def source(self):
tools.get(**self.conan_data["sources"][self.version][0],
Expand Down