diff --git a/recipes/opencv/4.x/conanfile.py b/recipes/opencv/4.x/conanfile.py index 2e1ee11d66a59..99ae290ae41dd 100644 --- a/recipes/opencv/4.x/conanfile.py +++ b/recipes/opencv/4.x/conanfile.py @@ -155,14 +155,13 @@ def configure(self): if not self.options.contrib: del self.options.contrib_freetype del self.options.contrib_sfm - if not self.options.dnn: - del self.options.dnn_cuda if not self.options.with_cuda: del self.options.with_cublas del self.options.with_cudnn del self.options.with_cufft - del self.options.dnn_cuda del self.options.cuda_arch_bin + if not self.options.dnn or not self.options.with_cuda: + del self.options.dnn_cuda if bool(self.options.with_jpeg): if self.options.get_safe("with_jpeg2000") == "jasper": self.options["jasper"].with_libjpeg = self.options.with_jpeg