SCsub 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/usr/bin/env python
  2. from misc.utility.scons_hints import *
  3. Import("env")
  4. Import("env_modules")
  5. env_astcenc = env_modules.Clone()
  6. # Thirdparty source files
  7. thirdparty_obj = []
  8. thirdparty_dir = "#thirdparty/astcenc/"
  9. thirdparty_sources = [
  10. "astcenc_averages_and_directions.cpp",
  11. "astcenc_block_sizes.cpp",
  12. "astcenc_color_quantize.cpp",
  13. "astcenc_color_unquantize.cpp",
  14. "astcenc_compress_symbolic.cpp",
  15. "astcenc_compute_variance.cpp",
  16. "astcenc_decompress_symbolic.cpp",
  17. "astcenc_diagnostic_trace.cpp",
  18. "astcenc_entry.cpp",
  19. "astcenc_find_best_partitioning.cpp",
  20. "astcenc_ideal_endpoints_and_weights.cpp",
  21. "astcenc_image.cpp",
  22. "astcenc_integer_sequence.cpp",
  23. "astcenc_mathlib.cpp",
  24. "astcenc_mathlib_softfloat.cpp",
  25. "astcenc_partition_tables.cpp",
  26. "astcenc_percentile_tables.cpp",
  27. "astcenc_pick_best_endpoint_format.cpp",
  28. "astcenc_quantization.cpp",
  29. "astcenc_symbolic_physical.cpp",
  30. "astcenc_weight_align.cpp",
  31. "astcenc_weight_quant_xfer_tables.cpp",
  32. ]
  33. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  34. env_astcenc.Prepend(CPPPATH=[thirdparty_dir])
  35. env_thirdparty = env_astcenc.Clone()
  36. env_thirdparty.disable_warnings()
  37. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  38. env.modules_sources += thirdparty_obj
  39. # Godot source files
  40. module_obj = []
  41. env_astcenc.add_source_files(module_obj, "*.cpp")
  42. env.modules_sources += module_obj
  43. # Needed to force rebuilding the module files when the thirdparty library is updated.
  44. env.Depends(module_obj, thirdparty_obj)