SCsub 765 B

12345678910111213141516171819202122232425262728293031
  1. #!/usr/bin/env python
  2. Import("env")
  3. Import("env_modules")
  4. env_enet = env_modules.Clone()
  5. # Thirdparty source files
  6. if env["builtin_enet"]:
  7. thirdparty_dir = "#thirdparty/enet/"
  8. thirdparty_sources = [
  9. "godot.cpp",
  10. "callbacks.c",
  11. "compress.c",
  12. "host.c",
  13. "list.c",
  14. "packet.c",
  15. "peer.c",
  16. "protocol.c",
  17. ]
  18. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  19. env_enet.Prepend(CPPPATH=[thirdparty_dir])
  20. env_enet.Append(CPPDEFINES=["GODOT_ENET"])
  21. env_thirdparty = env_enet.Clone()
  22. env_thirdparty.disable_warnings()
  23. env_thirdparty.add_source_files(env.modules_sources, thirdparty_sources)
  24. env_enet.add_source_files(env.modules_sources, "*.cpp")