mirror of
https://github.com/godotengine/godot.git
synced 2024-11-23 04:33:29 +00:00
74e6adda57
Sometimes scons doesn't detects that a new module is being added. This commit fix it.
(cherry picked from commit b667e72adf
)
31 lines
767 B
Python
31 lines
767 B
Python
#!/usr/bin/env python
|
|
|
|
Import("env")
|
|
|
|
import os
|
|
|
|
import modules_builders
|
|
|
|
env_modules = env.Clone()
|
|
|
|
Export("env_modules")
|
|
|
|
env.Depends("modules_enabled.gen.h", Value(env.module_list))
|
|
env.CommandNoCache("modules_enabled.gen.h", Value(env.module_list), modules_builders.generate_modules_enabled)
|
|
|
|
env.modules_sources = []
|
|
env_modules.add_source_files(env.modules_sources, "register_module_types.gen.cpp")
|
|
|
|
for name, path in env.module_list.items():
|
|
if not os.path.isabs(path):
|
|
SConscript(name + "/SCsub") # Built-in.
|
|
else:
|
|
SConscript(path + "/SCsub") # Custom.
|
|
|
|
if env["split_libmodules"]:
|
|
env.split_lib("modules", env_lib=env_modules)
|
|
else:
|
|
lib = env_modules.add_library("modules", env.modules_sources)
|
|
|
|
env.Prepend(LIBS=[lib])
|