SCsub 1019 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/usr/bin/env python
  2. Import('env')
  3. Import('env_modules')
  4. env_upnp = env_modules.Clone()
  5. # Thirdparty source files
  6. if env['builtin_miniupnpc']:
  7. thirdparty_dir = "#thirdparty/miniupnpc/"
  8. thirdparty_sources = [
  9. "miniupnpc.c",
  10. "upnpcommands.c",
  11. "miniwget.c",
  12. "upnpdev.c",
  13. "igd_desc_parse.c",
  14. "minissdpc.c",
  15. "minisoap.c",
  16. "minixml.c",
  17. "connecthostport.c",
  18. "receivedata.c",
  19. "portlistingparse.c",
  20. "upnpreplyparse.c",
  21. ]
  22. thirdparty_sources = [thirdparty_dir + "miniupnpc/" + file for file in thirdparty_sources]
  23. env_upnp.Append(CPPPATH=[thirdparty_dir])
  24. env_upnp.Append(CPPFLAGS=["-DMINIUPNP_STATICLIB"])
  25. env_upnp.Append(CPPFLAGS=["-DMINIUPNPC_SET_SOCKET_TIMEOUT"])
  26. env_thirdparty = env_upnp.Clone()
  27. env_thirdparty.disable_warnings()
  28. env_thirdparty.add_source_files(env.modules_sources, thirdparty_sources)
  29. # Godot source files
  30. env_upnp.add_source_files(env.modules_sources, "*.cpp")