SCsub 868 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/usr/bin/env python
  2. Import("env")
  3. Import("env_modules")
  4. env_xatlas_unwrap = env_modules.Clone()
  5. # Thirdparty source files
  6. thirdparty_obj = []
  7. if env["builtin_xatlas"]:
  8. thirdparty_dir = "#thirdparty/xatlas/"
  9. thirdparty_sources = [
  10. "xatlas.cpp",
  11. ]
  12. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  13. env_xatlas_unwrap.Prepend(CPPPATH=[thirdparty_dir])
  14. env_thirdparty = env_xatlas_unwrap.Clone()
  15. env_thirdparty.disable_warnings()
  16. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  17. env.modules_sources += thirdparty_obj
  18. # Godot source files
  19. module_obj = []
  20. env_xatlas_unwrap.add_source_files(module_obj, "*.cpp")
  21. env.modules_sources += module_obj
  22. # Needed to force rebuilding the module files when the thirdparty library is updated.
  23. env.Depends(module_obj, thirdparty_obj)