summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct16
1 files changed, 16 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index e866a4c998..86014b8160 100644
--- a/SConstruct
+++ b/SConstruct
@@ -272,6 +272,15 @@ if selected_platform in platform_list:
else:
env = env_base.Clone()
+ # Custom tools are loaded automatically by SCons from site_scons/site_tools,
+ # but we want to use a different folder, so we register it manually.
+ from SCons.Script.Main import _load_site_scons_dir
+
+ _load_site_scons_dir(".", "misc/scons")
+
+ env.Tool("compilation_db")
+ env.Alias("compiledb", env.CompilationDatabase("compile_commands.json"))
+
if env["dev"]:
env["verbose"] = True
env["warnings"] = "extra"
@@ -598,6 +607,13 @@ if selected_platform in platform_list:
)
}
)
+ env.Append(
+ BUILDERS={
+ "GLSL_HEADER": env.Builder(
+ action=run_in_subprocess(gles_builders.build_raw_headers), suffix="glsl.gen.h", src_suffix=".glsl"
+ )
+ }
+ )
scons_cache_path = os.environ.get("SCONS_CACHE")
if scons_cache_path != None: