SCsub 1.5 KB

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