diff options
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/SConstruct b/SConstruct index b539dc59b7..94bc53eaa5 100644 --- a/SConstruct +++ b/SConstruct @@ -1,7 +1,7 @@ #!/usr/bin/env python EnsureSConsVersion(3, 0, 0) -EnsurePythonVersion(3, 5) +EnsurePythonVersion(3, 6) # System import atexit @@ -166,12 +166,10 @@ opts.Add(BoolVariable("builtin_libogg", "Use the built-in libogg library", True) opts.Add(BoolVariable("builtin_libpng", "Use the built-in libpng library", True)) opts.Add(BoolVariable("builtin_libtheora", "Use the built-in libtheora library", True)) opts.Add(BoolVariable("builtin_libvorbis", "Use the built-in libvorbis library", True)) -opts.Add(BoolVariable("builtin_libvpx", "Use the built-in libvpx library", True)) opts.Add(BoolVariable("builtin_libwebp", "Use the built-in libwebp library", True)) opts.Add(BoolVariable("builtin_wslay", "Use the built-in wslay library", True)) opts.Add(BoolVariable("builtin_mbedtls", "Use the built-in mbedTLS library", True)) opts.Add(BoolVariable("builtin_miniupnpc", "Use the built-in miniupnpc library", True)) -opts.Add(BoolVariable("builtin_opus", "Use the built-in Opus library", True)) opts.Add(BoolVariable("builtin_pcre2", "Use the built-in PCRE2 library", True)) opts.Add(BoolVariable("builtin_pcre2_with_jit", "Use JIT compiler for the built-in PCRE2 library", True)) opts.Add(BoolVariable("builtin_recast", "Use the built-in Recast library", True)) @@ -308,21 +306,19 @@ env_base.Prepend(CPPPATH=["#"]) env_base.platform_exporters = platform_exporters env_base.platform_apis = platform_apis -if env_base["use_precise_math_checks"]: - env_base.Append(CPPDEFINES=["PRECISE_MATH_CHECKS"]) +# Build type defines - more platform-specific ones can be in detect.py. +if env_base["target"] == "release_debug" or env_base["target"] == "debug": + # DEBUG_ENABLED enables debugging *features* and debug-only code, which is intended + # to give *users* extra debugging information for their game development. + env_base.Append(CPPDEFINES=["DEBUG_ENABLED"]) if env_base["target"] == "debug": - env_base.Append(CPPDEFINES=["DEBUG_MEMORY_ALLOC", "DISABLE_FORCED_INLINE"]) - - # The two options below speed up incremental builds, but reduce the certainty that all files - # will properly be rebuilt. As such, we only enable them for debug (dev) builds, not release. + # DEV_ENABLED enables *engine developer* code which should only be compiled for those + # working on the engine itself. + env_base.Append(CPPDEFINES=["DEV_ENABLED"]) - # To decide whether to rebuild a file, use the MD5 sum only if the timestamp has changed. - # https://scons.org/doc/production/HTML/scons-user/ch06.html#idm139837621851792 - env_base.Decider("MD5-timestamp") - # Use cached implicit dependencies by default. Can be overridden by specifying `--implicit-deps-changed` in the command line. - # https://scons.org/doc/production/HTML/scons-user/ch06s04.html - env_base.SetOption("implicit_cache", 1) +if env_base["use_precise_math_checks"]: + env_base.Append(CPPDEFINES=["PRECISE_MATH_CHECKS"]) if env_base["no_editor_splash"]: env_base.Append(CPPDEFINES=["NO_EDITOR_SPLASH"]) |