2022-03-15 13:29:32 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
Import("env")
|
|
|
|
Import("env_modules")
|
|
|
|
|
|
|
|
env_gdscript = env_modules.Clone()
|
|
|
|
|
|
|
|
env_gdscript.add_source_files(env.modules_sources, "*.cpp")
|
|
|
|
|
|
|
|
if env["tools"]:
|
|
|
|
env_gdscript.add_source_files(env.modules_sources, "./editor/*.cpp")
|
2023-10-02 19:06:13 +02:00
|
|
|
|
|
|
|
# Those two modules are required for the language server protocol
|
|
|
|
if env["module_jsonrpc_enabled"] and env["module_websocket_enabled"]:
|
|
|
|
env_gdscript.add_source_files(env.modules_sources, "./language_server/*.cpp")
|
|
|
|
else:
|
|
|
|
# Using a define in the disabled case, to avoid having an extra define
|
|
|
|
# in regular builds where all modules are enabled.
|
2023-12-24 00:02:22 +01:00
|
|
|
env_gdscript.Append(CPPDEFINES=["GDSCRIPT_NO_LSP"])
|
|
|
|
# Also needed in main env to unexpose --lsp-port option.
|
|
|
|
env.Append(CPPDEFINES=["GDSCRIPT_NO_LSP"])
|