mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 11:10:21 +08:00
Merge pull request #23514 from tappytaps:mac-catalyst-fix
updated mac catalyst target to be compatible with latest xCode / macos
This commit is contained in:
commit
f1076541d1
@ -115,7 +115,7 @@ class Builder:
|
|||||||
if xcode_ver >= 7 and target[1] == 'Catalyst':
|
if xcode_ver >= 7 and target[1] == 'Catalyst':
|
||||||
sdk_path = check_output(["xcodebuild", "-version", "-sdk", "macosx", "Path"]).decode('utf-8').rstrip()
|
sdk_path = check_output(["xcodebuild", "-version", "-sdk", "macosx", "Path"]).decode('utf-8').rstrip()
|
||||||
c_flags = [
|
c_flags = [
|
||||||
"-target %s-apple-ios13.0-macabi" % target[0], # e.g. x86_64-apple-ios13.2-macabi # -mmacosx-version-min=10.15
|
"-target %s-apple-ios14.0-macabi" % target[0], # e.g. x86_64-apple-ios13.2-macabi # -mmacosx-version-min=10.15
|
||||||
"-isysroot %s" % sdk_path,
|
"-isysroot %s" % sdk_path,
|
||||||
"-iframework %s/System/iOSSupport/System/Library/Frameworks" % sdk_path,
|
"-iframework %s/System/iOSSupport/System/Library/Frameworks" % sdk_path,
|
||||||
"-isystem %s/System/iOSSupport/usr/include" % sdk_path,
|
"-isystem %s/System/iOSSupport/usr/include" % sdk_path,
|
||||||
@ -358,7 +358,7 @@ class Builder:
|
|||||||
link_target = target[:target.find("-")] + "-apple-ios" + os.environ['IPHONEOS_DEPLOYMENT_TARGET'] + ("-simulator" if target.endswith("simulator") else "")
|
link_target = target[:target.find("-")] + "-apple-ios" + os.environ['IPHONEOS_DEPLOYMENT_TARGET'] + ("-simulator" if target.endswith("simulator") else "")
|
||||||
else:
|
else:
|
||||||
if target_platform == "catalyst":
|
if target_platform == "catalyst":
|
||||||
link_target = "%s-apple-ios13.0-macabi" % target[:target.find("-")]
|
link_target = "%s-apple-ios14.0-macabi" % target[:target.find("-")]
|
||||||
else:
|
else:
|
||||||
link_target = "%s-apple-darwin" % target[:target.find("-")]
|
link_target = "%s-apple-darwin" % target[:target.find("-")]
|
||||||
bitcode_flags = ["-fembed-bitcode", "-Xlinker", "-bitcode_verify"] if is_device and not self.bitcodedisabled else []
|
bitcode_flags = ["-fembed-bitcode", "-Xlinker", "-bitcode_verify"] if is_device and not self.bitcodedisabled else []
|
||||||
|
Loading…
Reference in New Issue
Block a user