SCsub 988 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/usr/bin/env python
  2. Import("env")
  3. iphone_lib = [
  4. "godot_iphone.cpp",
  5. "os_iphone.cpp",
  6. "semaphore_iphone.cpp",
  7. "gl_view.mm",
  8. "main.m",
  9. "app_delegate.mm",
  10. "view_controller.mm",
  11. "game_center.mm",
  12. "in_app_store.mm",
  13. "icloud.mm",
  14. "ios.mm",
  15. "gl_view_gesture_recognizer.m",
  16. ]
  17. env_ios = env.Clone()
  18. ios_lib = env_ios.add_library("iphone", iphone_lib)
  19. # (iOS) Enable module support
  20. env_ios.Append(CCFLAGS=["-fmodules", "-fcxx-modules"])
  21. def combine_libs(target=None, source=None, env=None):
  22. lib_path = target[0].srcnode().abspath
  23. if "osxcross" in env:
  24. libtool = "$IPHONEPATH/usr/bin/${ios_triple}libtool"
  25. else:
  26. libtool = "$IPHONEPATH/usr/bin/libtool"
  27. env.Execute(
  28. libtool + ' -static -o "' + lib_path + '" ' + " ".join([('"' + lib.srcnode().abspath + '"') for lib in source])
  29. )
  30. combine_command = env_ios.Command("#bin/libgodot" + env_ios["LIBSUFFIX"], [ios_lib] + env_ios["LIBS"], combine_libs)