From 7402b5ed5b44f162fe598df6d8ee3a3162454919 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 19 Dec 2022 10:21:58 +0100 Subject: [PATCH] propagate jpeg only if libjpeg-turbo --- recipes/opencv/3.x/conanfile.py | 6 ++++-- recipes/opencv/4.x/conanfile.py | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) 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: