|
27 | 27 | Any arguments that are not recognized by this script are passed through to the ios/osx build_framework.py scripts.
|
28 | 28 | """
|
29 | 29 | parser = argparse.ArgumentParser(description=description, epilog=epilog)
|
30 |
| - parser.add_argument('out', metavar='OUTDIR', help='The directory where the xcframework will be created') |
| 30 | + parser.add_argument('-o', '--out', metavar='OUTDIR', help='<Required> The directory where the xcframework will be created', required=True) |
31 | 31 | parser.add_argument('--framework_name', default='opencv2', help='Name of OpenCV xcframework (default: opencv2, will change to OpenCV in future version)')
|
32 | 32 | parser.add_argument('--iphoneos_archs', default=None, help='select iPhoneOS target ARCHS. Default is "armv7,arm64"')
|
33 | 33 | parser.add_argument('--iphonesimulator_archs', default=None, help='select iPhoneSimulator target ARCHS. Default is "x86_64,arm64"')
|
@@ -81,26 +81,26 @@ def get_or_create_build_folder(base_dir, platform):
|
81 | 81 | if iphoneos_archs:
|
82 | 82 | build_folder = get_or_create_build_folder(args.out, "iphoneos")
|
83 | 83 | build_folders.append(build_folder)
|
84 |
| - command = ["python3", ios_script_path, "--iphoneos_archs", iphoneos_archs, "--framework_name", args.framework_name, "--build_only_specified_archs", build_folder] + unknown_args |
| 84 | + command = ["python3", ios_script_path, build_folder, "--iphoneos_archs", iphoneos_archs, "--framework_name", args.framework_name, "--build_only_specified_archs"] + unknown_args |
85 | 85 | print_header("Building iPhoneOS frameworks")
|
86 | 86 | print(command)
|
87 | 87 | execute(command, cwd=os.getcwd())
|
88 | 88 | if iphonesimulator_archs:
|
89 | 89 | build_folder = get_or_create_build_folder(args.out, "iphonesimulator")
|
90 | 90 | build_folders.append(build_folder)
|
91 |
| - command = ["python3", ios_script_path, "--iphonesimulator_archs", iphonesimulator_archs, "--framework_name", args.framework_name, "--build_only_specified_archs", build_folder] + unknown_args |
| 91 | + command = ["python3", ios_script_path, build_folder, "--iphonesimulator_archs", iphonesimulator_archs, "--framework_name", args.framework_name, "--build_only_specified_archs"] + unknown_args |
92 | 92 | print_header("Building iPhoneSimulator frameworks")
|
93 | 93 | execute(command, cwd=os.getcwd())
|
94 | 94 | if macos_archs:
|
95 | 95 | build_folder = get_or_create_build_folder(args.out, "macos")
|
96 | 96 | build_folders.append(build_folder)
|
97 |
| - command = ["python3", osx_script_path, "--macos_archs", macos_archs, "--framework_name", args.framework_name, "--build_only_specified_archs", build_folder] + unknown_args |
| 97 | + command = ["python3", osx_script_path, build_folder, "--macos_archs", macos_archs, "--framework_name", args.framework_name, "--build_only_specified_archs"] + unknown_args |
98 | 98 | print_header("Building MacOS frameworks")
|
99 | 99 | execute(command, cwd=os.getcwd())
|
100 | 100 | if catalyst_archs:
|
101 | 101 | build_folder = get_or_create_build_folder(args.out, "catalyst")
|
102 | 102 | build_folders.append(build_folder)
|
103 |
| - command = ["python3", osx_script_path, "--catalyst_archs", catalyst_archs, "--framework_name", args.framework_name, "--build_only_specified_archs", build_folder] + unknown_args |
| 103 | + command = ["python3", osx_script_path, build_folder, "--catalyst_archs", catalyst_archs, "--framework_name", args.framework_name, "--build_only_specified_archs"] + unknown_args |
104 | 104 | print_header("Building Catalyst frameworks")
|
105 | 105 | execute(command, cwd=os.getcwd())
|
106 | 106 |
|
|
0 commit comments