diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-08-28 13:10:32 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2019-08-28 13:29:37 +0200 |
commit | b994124df3546b351f673304ad227195298b102c (patch) | |
tree | e00d674b2bc064e2db633aa356752138ea833606 /modules/gdscript/SCsub | |
parent | 46ad60385b68a8af142108715a12a3363ffb3fea (diff) |
GDScript: Disable LSP if either jsonrpc or websocket are disabled
Follow-up to #29780.
Diffstat (limited to 'modules/gdscript/SCsub')
-rw-r--r-- | modules/gdscript/SCsub | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/gdscript/SCsub b/modules/gdscript/SCsub index 6285e6bb54..74e653ce43 100644 --- a/modules/gdscript/SCsub +++ b/modules/gdscript/SCsub @@ -8,5 +8,12 @@ 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") - env_gdscript.add_source_files(env.modules_sources, "./language_server/*.cpp") + env_gdscript.add_source_files(env.modules_sources, "./editor/*.cpp") + + # 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. + env_gdscript.Append(CPPDEFINES=['GDSCRIPT_NO_LSP']) |