SCsub 948 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/usr/bin/env python
  2. Import("env")
  3. Import("env_modules")
  4. env_tinyexr = env_modules.Clone()
  5. # Thirdparty source files
  6. thirdparty_obj = []
  7. # Not unbundled for now as they are not commonly available as shared library
  8. thirdparty_dir = "#thirdparty/tinyexr/"
  9. thirdparty_sources = [
  10. "tinyexr.cc",
  11. ]
  12. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  13. env_tinyexr.Prepend(CPPPATH=[thirdparty_dir])
  14. # Enable threaded loading with C++11.
  15. env_tinyexr.Append(CPPDEFINES=["TINYEXR_USE_THREAD"])
  16. env_thirdparty = env_tinyexr.Clone()
  17. env_thirdparty.disable_warnings()
  18. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  19. env.modules_sources += thirdparty_obj
  20. # Godot source files
  21. module_obj = []
  22. env_tinyexr.add_source_files(module_obj, "*.cpp")
  23. env.modules_sources += module_obj
  24. # Needed to force rebuilding the module files when the thirdparty library is updated.
  25. env.Depends(module_obj, thirdparty_obj)