mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
Merge branch 4.x
This commit is contained in:
@@ -1601,7 +1601,7 @@ if __name__ == "__main__":
|
||||
arg_parser = argparse.ArgumentParser(description='OpenCV Objective-C Wrapper Generator')
|
||||
arg_parser.add_argument('-p', '--parser', required=True, help='OpenCV header parser')
|
||||
arg_parser.add_argument('-c', '--config', required=True, help='OpenCV modules config')
|
||||
arg_parser.add_argument('-t', '--target', required=True, help='Target (either ios or osx)')
|
||||
arg_parser.add_argument('-t', '--target', required=True, help='Target (either ios or osx or visionos)')
|
||||
arg_parser.add_argument('-f', '--framework', required=True, help='Framework name')
|
||||
|
||||
args=arg_parser.parse_args()
|
||||
@@ -1672,6 +1672,7 @@ if __name__ == "__main__":
|
||||
logging.info("\nCommon headers (%d):\n%s", len(common_headers), pformat(common_headers))
|
||||
|
||||
gendict_fname = os.path.join(misc_location, 'gen_dict.json')
|
||||
module_source_map = {}
|
||||
if os.path.exists(gendict_fname):
|
||||
with open(gendict_fname) as f:
|
||||
gen_type_dict = json.load(f)
|
||||
@@ -1688,6 +1689,7 @@ if __name__ == "__main__":
|
||||
header_fix.update(gen_type_dict.get("header_fix", {}))
|
||||
enum_fix.update(gen_type_dict.get("enum_fix", {}))
|
||||
const_fix.update(gen_type_dict.get("const_fix", {}))
|
||||
module_source_map = gen_type_dict.get("SourceMap", {})
|
||||
namespaces_dict.update(gen_type_dict.get("namespaces_dict", {}))
|
||||
module_imports += gen_type_dict.get("module_imports", [])
|
||||
|
||||
@@ -1696,15 +1698,10 @@ if __name__ == "__main__":
|
||||
if os.path.exists(objc_files_dir):
|
||||
copied_files += copy_objc_files(objc_files_dir, objc_base_path, module, True)
|
||||
|
||||
if args.target == 'ios':
|
||||
ios_files_dir = os.path.join(misc_location, 'ios')
|
||||
if os.path.exists(ios_files_dir):
|
||||
copied_files += copy_objc_files(ios_files_dir, objc_base_path, module, True)
|
||||
|
||||
if args.target == 'osx':
|
||||
osx_files_dir = os.path.join(misc_location, 'macosx')
|
||||
if os.path.exists(osx_files_dir):
|
||||
copied_files += copy_objc_files(osx_files_dir, objc_base_path, module, True)
|
||||
target_path = 'macosx' if args.target == 'osx' else module_source_map.get(args.target, args.target)
|
||||
target_files_dir = os.path.join(misc_location, target_path)
|
||||
if os.path.exists(target_files_dir):
|
||||
copied_files += copy_objc_files(target_files_dir, objc_base_path, module, True)
|
||||
|
||||
objc_test_files_dir = os.path.join(misc_location, 'test')
|
||||
if os.path.exists(objc_test_files_dir):
|
||||
|
||||
Reference in New Issue
Block a user