From 213a8bb99f84ad3c5f843a3c0e7d38c518e312f7 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Thu, 27 Oct 2022 16:16:12 +0200 Subject: [PATCH] opencv: in v4 the opencv2 include dir is in include/opencv4, so include/opencv4 must be in CPATH --- easybuild/easyblocks/o/opencv.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easybuild/easyblocks/o/opencv.py b/easybuild/easyblocks/o/opencv.py index 035fd751a33..564b41bc356 100644 --- a/easybuild/easyblocks/o/opencv.py +++ b/easybuild/easyblocks/o/opencv.py @@ -228,6 +228,9 @@ def make_module_extra(self): """Custom extra module file entries for OpenCV.""" txt = super(EB_OpenCV, self).make_module_extra() + if LooseVersion(self.version) >= LooseVersion('4.0'): + txt += self.module_generator.prepend_paths('CPATH', os.path.join('include', 'opencv4')) + txt += self.module_generator.prepend_paths('CLASSPATH', os.path.join('share', 'OpenCV', 'java')) if os.path.exists(os.path.join(self.installdir, self.pylibdir)):