def checkCMakeVersion(self): if get_xcode_version() >= (12, 2): assert get_cmake_version() >= ( 3, 19 ), "CMake 3.19 or later is required when building with Xcode 12.2 or greater. Current version is {}".format( get_cmake_version()) else: assert get_cmake_version() >= ( 3, 17 ), "CMake 3.17 or later is required. Current version is {}".format( get_cmake_version())
This script builds OpenCV into an xcframework compatible with the platforms of your choice. Just run it and grab a snack; you'll be waiting a while. """ import sys, os, argparse, pathlib, traceback, contextlib, shutil from cv_build_utils import execute, print_error, print_header, get_xcode_version, get_cmake_version if __name__ == "__main__": # Check for dependencies assert sys.version_info >= ( 3, 6), "Python 3.6 or later is required! Current version is {}".format( sys.version_info) # Need CMake 3.18.5/3.19 or later for a Silicon-related fix to building for the iOS Simulator. # See https://gitlab.kitware.com/cmake/cmake/-/issues/21425 for context. assert get_cmake_version() >= ( 3, 18, 5), "CMake 3.18.5 or later is required. Current version is {}".format( get_cmake_version()) # Need Xcode 12.2 for Apple Silicon support assert get_xcode_version() >= (12, 2), \ "Xcode 12.2 command line tools or later are required! Current version is {}. ".format(get_xcode_version()) + \ "Run xcode-select to switch if you have multiple Xcode installs." # Parse arguments description = """ This script builds OpenCV into an xcframework supporting the Apple platforms of your choice. """ epilog = """ Any arguments that are not recognized by this script are passed through to the ios/osx build_framework.py scripts. """
def checkCMakeVersion(self): assert get_cmake_version() >= ( 3, 17 ), "CMake 3.17 or later is required. Current version is {}".format( get_cmake_version())
#!/usr/bin/env python3 """ This script builds OpenCV into an xcframework compatible with the platforms of your choice. Just run it and grab a snack; you'll be waiting a while. """ import sys, os, argparse, pathlib, traceback, contextlib, shutil from cv_build_utils import execute, print_error, print_header, get_xcode_version, get_cmake_version if __name__ == "__main__": # Check for dependencies assert sys.version_info >= (3, 6), "Python 3.6 or later is required! Current version is {}".format(sys.version_info) # Need CMake 3.18.5/3.19 or later for a Silicon-related fix to building for the iOS Simulator. # See https://gitlab.kitware.com/cmake/cmake/-/issues/21425 for context. assert get_cmake_version() >= (3, 18, 5), "CMake 3.18.5 or later is required. Current version is {}".format(get_cmake_version()) # Need Xcode 12.2 for Apple Silicon support assert get_xcode_version() >= (12, 2), \ "Xcode 12.2 command line tools or later are required! Current version is {}. ".format(get_xcode_version()) + \ "Run xcode-select to switch if you have multiple Xcode installs." # Parse arguments description = """ This script builds OpenCV into an xcframework supporting the Apple platforms of your choice. """ epilog = """ Any arguments that are not recognized by this script are passed through to the ios/osx build_framework.py scripts. """ parser = argparse.ArgumentParser(description=description, epilog=epilog) parser.add_argument('out', metavar='OUTDIR', help='The directory where the xcframework will be created') parser.add_argument('--framework_name', default='opencv2', help='Name of OpenCV xcframework (default: opencv2, will change to OpenCV in future version)')