SCsub 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/usr/bin/env python
  2. Import('env')
  3. Import('env_modules')
  4. env_webm = env_modules.Clone()
  5. # Thirdparty source files
  6. thirdparty_dir = "#thirdparty/libsimplewebm/"
  7. thirdparty_sources = [
  8. "libwebm/mkvparser/mkvparser.cc",
  9. "OpusVorbisDecoder.cpp",
  10. "VPXDecoder.cpp",
  11. "WebMDemuxer.cpp",
  12. ]
  13. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  14. env_webm.Append(CPPPATH=[thirdparty_dir, thirdparty_dir + "libwebm/"])
  15. # upstream uses c++11
  16. if (not env_webm.msvc):
  17. env_webm.Append(CCFLAGS="-std=c++11")
  18. # also requires libogg, libvorbis and libopus
  19. if env['builtin_libogg']:
  20. env_webm.Append(CPPPATH=["#thirdparty/libogg"])
  21. if env['builtin_libvorbis']:
  22. env_webm.Append(CPPPATH=["#thirdparty/libvorbis"])
  23. if env['builtin_opus']:
  24. env_webm.Append(CPPPATH=["#thirdparty/opus"])
  25. if env['builtin_libvpx']:
  26. env_webm.Append(CPPPATH=["#thirdparty/libvpx"])
  27. SConscript("libvpx/SCsub")
  28. env_thirdparty = env_webm.Clone()
  29. env_thirdparty.disable_warnings()
  30. env_thirdparty.add_source_files(env.modules_sources, thirdparty_sources)
  31. # Godot source files
  32. env_webm.add_source_files(env.modules_sources, "*.cpp")