SCsub 1000 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env python
  2. Import("env")
  3. Import("env_modules")
  4. env_gdscript = env_modules.Clone()
  5. env_gdscript.add_source_files(env.modules_sources, "*.cpp")
  6. if env.editor_build:
  7. env_gdscript.add_source_files(env.modules_sources, "./editor/*.cpp")
  8. SConscript("editor/script_templates/SCsub")
  9. # Those two modules are required for the language server protocol
  10. if env["module_jsonrpc_enabled"] and env["module_websocket_enabled"]:
  11. env_gdscript.add_source_files(env.modules_sources, "./language_server/*.cpp")
  12. else:
  13. # Using a define in the disabled case, to avoid having an extra define
  14. # in regular builds where all modules are enabled.
  15. env_gdscript.Append(CPPDEFINES=["GDSCRIPT_NO_LSP"])
  16. # Also needed in main env to unexpose --lsp-port option.
  17. env.Append(CPPDEFINES=["GDSCRIPT_NO_LSP"])
  18. if env["tests"]:
  19. env_gdscript.Append(CPPDEFINES=["TESTS_ENABLED"])
  20. env_gdscript.add_source_files(env.modules_sources, "./tests/*.cpp")