SCsub 755 B

1234567891011121314151617181920212223242526272829303132
  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 = ["nanosvg.cc"]
  9. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  10. env_svg.Prepend(CPPPATH=[thirdparty_dir])
  11. env_thirdparty = env_svg.Clone()
  12. env_thirdparty.disable_warnings()
  13. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  14. env.modules_sources += thirdparty_obj
  15. # Godot source files
  16. module_obj = []
  17. env_svg.add_source_files(module_obj, "*.cpp")
  18. env.modules_sources += module_obj
  19. # Needed to force rebuilding the module files when the thirdparty library is updated.
  20. env.Depends(module_obj, thirdparty_obj)