summaryrefslogtreecommitdiff
path: root/modules/gdscript/SCsub
blob: 2f507db54879071561715c54fd0b58009097a209 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/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")

    SConscript("editor/script_templates/SCsub")

    # 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"])


if env["tests"]:
    env_gdscript.Append(CPPDEFINES=["TESTS_ENABLED"])
    env_gdscript.add_source_files(env.modules_sources, "./tests/*.cpp")