1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Add separate simulator flag for iOS build, change main library to xcframework.

Build and export iOS Mono libs as `.xcframework`s, for Apple Silicon iOS simulator support.
This commit is contained in:
bruvzg
2021-01-26 16:55:34 +02:00
committed by Ignacio Roldán Etchevery
parent 92713854a5
commit 683f96df35
22 changed files with 260 additions and 23 deletions

View File

@@ -86,7 +86,7 @@ def configure(env, env_mono):
is_android = env["platform"] == "android"
is_javascript = env["platform"] == "javascript"
is_ios = env["platform"] == "iphone"
is_ios_sim = is_ios and env["arch"] in ["x86", "x86_64"]
is_ios_sim = is_ios and env["ios_simulator"]
tools_enabled = env["tools"]
mono_static = env["mono_static"]
@@ -271,9 +271,20 @@ def configure(env, env_mono):
arch = env["arch"]
def copy_mono_lib(libname_wo_ext):
copy_file(
mono_lib_path, "#bin", libname_wo_ext + ".a", "%s.iphone.%s.a" % (libname_wo_ext, arch)
)
if is_ios_sim:
copy_file(
mono_lib_path,
"#bin",
libname_wo_ext + ".a",
"%s.iphone.%s.simulator.a" % (libname_wo_ext, arch),
)
else:
copy_file(
mono_lib_path,
"#bin",
libname_wo_ext + ".a",
"%s.iphone.%s.a" % (libname_wo_ext, arch),
)
# Copy Mono libraries to the output folder. These are meant to be bundled with
# the export templates and added to the Xcode project when exporting a game.