SCsub 753 B

123456789101112131415161718192021222324252627
  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.Append(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.Append(CPPPATH=[thirdparty_dir])
  15. env.Append(CCFLAGS=["-DSVG_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")