gen_all.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/usr/bin/python
  2. # This file is part of OpenCV project.
  3. # It is subject to the license terms in the LICENSE file found in the top-level directory
  4. # of this distribution and at http://opencv.org/license.html
  5. # Copyright (C) 2020 by Archit Rungta
  6. import sys
  7. import subprocess
  8. import os
  9. mod_path = sys.argv[1]
  10. hdr_list = [
  11. mod_path+"/core/include/opencv2/core.hpp",
  12. mod_path+"/core/include/opencv2/core/base.hpp",
  13. mod_path+"/core/include/opencv2/core/bindings_utils.hpp",
  14. mod_path+"/core/include/opencv2/core/optim.hpp",
  15. mod_path+"/core/include/opencv2/core/persistence.hpp",
  16. mod_path+"/core/include/opencv2/core/types.hpp",
  17. mod_path+"/core/include/opencv2/core/utility.hpp"]
  18. for module in sys.argv[2:]:
  19. if module=='opencv_imgproc':
  20. hdr_list.append(mod_path+"/imgproc/include/opencv2/imgproc.hpp")
  21. elif module =='opencv_dnn':
  22. hdr_list.append(mod_path+"/dnn/include/opencv2/dnn/dnn.hpp")
  23. elif module == 'opencv_imgcodecs':
  24. hdr_list.append(mod_path+"/imgcodecs/include/opencv2/imgcodecs.hpp")
  25. elif module =='opencv_videoio':
  26. hdr_list.append(mod_path+"/videoio/include/opencv2/videoio.hpp")
  27. elif module =='opencv_highgui':
  28. hdr_list.append(mod_path+"/highgui/include/opencv2/highgui.hpp")
  29. elif module =='opencv_calib3d':
  30. hdr_list.append(mod_path+"/calib3d/include/opencv2/calib3d.hpp")
  31. if not os.path.exists('autogen_cpp'):
  32. os.makedirs('autogen_cpp')
  33. os.makedirs('autogen_jl')
  34. subprocess.call([sys.executable, 'gen3_cpp.py', str(';'.join(hdr_list))])
  35. subprocess.call([sys.executable, 'gen3_julia_cxx.py', str(';'.join(hdr_list))])
  36. subprocess.call([sys.executable, 'gen3_julia.py', str(';'.join(hdr_list))])