SCsub 756 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env python
  2. Import('env')
  3. Import('env_modules')
  4. env_svg = env_modules.Clone()
  5. # Thirdparty source files
  6. thirdparty_dir = "#thirdparty/nanosvg/"
  7. thirdparty_sources = [
  8. "nanosvg.cc"
  9. ]
  10. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  11. env_svg.Prepend(CPPPATH=[thirdparty_dir])
  12. # FIXME: Needed in editor/editor_themes.cpp for now, but ideally there
  13. # shouldn't be a dependency on modules/ and its own 3rd party deps.
  14. env.Prepend(CPPPATH=[thirdparty_dir])
  15. env.Append(CPPDEFINES=["SVG_ENABLED"])
  16. env_thirdparty = env_svg.Clone()
  17. env_thirdparty.disable_warnings()
  18. env_thirdparty.add_source_files(env.modules_sources, thirdparty_sources)
  19. # Godot's own source files
  20. env_svg.add_source_files(env.modules_sources, "*.cpp")