SCsub 907 B

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