SCsub 954 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/usr/bin/env python
  2. Import("env")
  3. env_effects = env.Clone()
  4. # Thirdparty source files
  5. thirdparty_obj = []
  6. thirdparty_dir = "#thirdparty/amd-fsr2/"
  7. thirdparty_sources = ["ffx_assert.cpp", "ffx_fsr2.cpp"]
  8. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  9. env_effects.Prepend(CPPPATH=[thirdparty_dir])
  10. # This flag doesn't actually control anything GCC specific in FSR2. It determines
  11. # if symbols should be exported, which is not required for Godot.
  12. env_effects.Append(CPPDEFINES=["FFX_GCC"])
  13. env_thirdparty = env_effects.Clone()
  14. env_thirdparty.disable_warnings()
  15. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  16. env.servers_sources += thirdparty_obj
  17. # Godot source files
  18. module_obj = []
  19. env_effects.add_source_files(module_obj, "*.cpp")
  20. env.servers_sources += module_obj
  21. # Needed to force rebuilding the module files when the thirdparty library is updated.
  22. env.Depends(module_obj, thirdparty_obj)