mirror of
https://github.com/godotengine/godot
synced 2024-09-05 13:18:38 +00:00
![Rémi Verschelde](/assets/img/avatar_default.png)
We already had `MODULE_*_ENABLED` defines but only in the modules environment, and a few custom `*_ENABLED` defines in the main env when we needed the information in core. Now this is defined in a single header which can be included in the files that need this information.
25 lines
581 B
Python
25 lines
581 B
Python
#!/usr/bin/env python
|
|
|
|
Import('env')
|
|
|
|
import modules_builders
|
|
|
|
env_modules = env.Clone()
|
|
|
|
Export('env_modules')
|
|
|
|
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 module in env.module_list:
|
|
SConscript(module + "/SCsub")
|
|
|
|
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])
|