SCsub 762 B

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