diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2018-03-28 18:45:54 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2018-03-28 19:08:20 +0200 |
commit | e7b9e2f97099bb37fc59dfc00affa04cee18a5d7 (patch) | |
tree | 8baa3413be82cb9c2d8d05d1c234d3317bd53d68 /platform/iphone | |
parent | 4b4ed9b72454dea13bd5f0935806519e67f13fbc (diff) |
Fix IPhone and OSX cross compilation
Diffstat (limited to 'platform/iphone')
-rw-r--r-- | platform/iphone/SCsub | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/platform/iphone/SCsub b/platform/iphone/SCsub index 6b5f30dc41..b96bec16b4 100644 --- a/platform/iphone/SCsub +++ b/platform/iphone/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +import os Import('env') @@ -21,6 +22,10 @@ ios_lib = env_ios.add_library('iphone', iphone_lib) def combine_libs(target=None, source=None, env=None): lib_path = target[0].srcnode().abspath - env.Execute('$IPHONEPATH/usr/bin/libtool -static -o "' + lib_path + '" ' + ' '.join([('"' + lib.srcnode().abspath + '"') for lib in source])) + if ("OSXCROSS_IOS" in os.environ): + libtool = '$IPHONEPATH/usr/bin/${ios_triple}libtool' + else: + libtool = "$IPHONEPATH/usr/bin/libtool" + env.Execute(libtool + ' -static -o "' + lib_path + '" ' + ' '.join([('"' + lib.srcnode().abspath + '"') for lib in source])) combine_command = env_ios.Command('#bin/libgodot' + env_ios['LIBSUFFIX'], [ios_lib] + env_ios['LIBS'], combine_libs) |