SCsub 801 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/usr/bin/env python
  2. Import("env")
  3. Import("env_modules")
  4. env_opensimplex = env_modules.Clone()
  5. # Thirdparty source files
  6. thirdparty_obj = []
  7. thirdparty_dir = "#thirdparty/misc/"
  8. thirdparty_sources = [
  9. "open-simplex-noise.c",
  10. ]
  11. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  12. env_opensimplex.Prepend(CPPPATH=[thirdparty_dir])
  13. env_thirdparty = env_opensimplex.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_opensimplex.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)