diff --git a/recipes/opencv/3.x/conanfile.py b/recipes/opencv/3.x/conanfile.py index 28a0157790398..adf91ed7b5a7c 100644 --- a/recipes/opencv/3.x/conanfile.py +++ b/recipes/opencv/3.x/conanfile.py @@ -331,8 +331,10 @@ def imageformats_deps(): components.append("jasper::jasper") if self.options.with_png: components.append("libpng::libpng") - if self.options.with_jpeg: - components.append("{0}::{0}".format(self.options.with_jpeg)) + if self.options.with_jpeg == "libjpeg": + components.append("libjpeg::libjpeg") + elif self.options.with_jpeg == "libjpeg-turbo": + components.append("libjpeg-turbo::jpeg") if self.options.with_tiff: components.append("libtiff::libtiff") if self.options.with_openexr: diff --git a/recipes/opencv/4.x/conanfile.py b/recipes/opencv/4.x/conanfile.py index 4274ee1b0f761..beb8d39b8c6c2 100644 --- a/recipes/opencv/4.x/conanfile.py +++ b/recipes/opencv/4.x/conanfile.py @@ -565,8 +565,10 @@ def imageformats_deps(): components.append("{0}::{0}".format(self.options.with_jpeg2000)) if self.options.with_png: components.append("libpng::libpng") - if self.options.with_jpeg: - components.append("{0}::{0}".format(self.options.with_jpeg)) + if self.options.with_jpeg == "libjpeg": + components.append("libjpeg::libjpeg") + elif self.options.with_jpeg == "libjpeg-turbo": + components.append("libjpeg-turbo::jpeg") if self.options.get_safe("with_tiff"): components.append("libtiff::libtiff") if self.options.with_openexr: