@@ -31,7 +31,7 @@ class OpenCVRecipe(NDKRecipe):
3131 'libopencv_video.so' ,
3232 'libopencv_dnn.so' ,
3333 'libopencv_imgcodecs.so' ,
34- 'libopencv_photo.so'
34+ 'libopencv_photo.so' ,
3535 ]
3636
3737 def get_lib_dir (self , arch ):
@@ -46,6 +46,16 @@ def get_recipe_env(self, arch):
4646 def build_arch (self , arch ):
4747 build_dir = join (self .get_build_dir (arch .arch ), 'build' )
4848 shprint (sh .mkdir , '-p' , build_dir )
49+
50+ opencv_extras = []
51+ if 'opencv_extras' in self .ctx .recipe_build_order :
52+ opencv_extras_dir = self .get_recipe (
53+ 'opencv_extras' , self .ctx ).get_build_dir (arch .arch )
54+ opencv_extras = [
55+ f'-DOPENCV_EXTRA_MODULES_PATH={ opencv_extras_dir } /modules' ,
56+ '-DBUILD_opencv_legacy=OFF' ,
57+ ]
58+
4959 with current_directory (build_dir ):
5060 env = self .get_recipe_env (arch )
5161
@@ -120,6 +130,8 @@ def build_arch(self, arch):
120130 '-DPYTHON{major}_PACKAGES_PATH={site_packages}' .format (
121131 major = python_major , site_packages = python_site_packages ),
122132
133+ * opencv_extras ,
134+
123135 self .get_build_dir (arch .arch ),
124136 _env = env )
125137 shprint (sh .make , '-j' + str (cpu_count ()), 'opencv_python' + python_major )
0 commit comments