Merge pull request #11567 from QuLogic/scons-var-types

Add types to scons command-line options
This commit is contained in:
Rémi Verschelde 2017-09-25 22:44:05 +02:00 committed by GitHub
commit 78aa7b382a
33 changed files with 197 additions and 196 deletions

View file

@ -7,7 +7,7 @@ Import('env_modules')
env_enet = env_modules.Clone()
if (env['builtin_enet'] != 'no'):
if env['builtin_enet']:
thirdparty_dir = "#thirdparty/enet/"
thirdparty_sources = [
"godot.cpp",

View file

@ -6,6 +6,6 @@ def can_build(platform):
def configure(env):
# Tools only, disabled for non-tools
# TODO: Find a cleaner way to achieve that
if (env["tools"] == "no"):
env["module_etc_enabled"] = "no"
if not env['tools']:
env['module_etc_enabled'] = False
env.disabled_modules.append("etc")

View file

@ -6,7 +6,7 @@ from compat import isbasestring
# Not building in a separate env as scene needs it
# Thirdparty source files
if (env['builtin_freetype'] != 'no'):
if env['builtin_freetype']:
thirdparty_dir = "#thirdparty/freetype/"
thirdparty_sources = [
"src/autofit/autofit.c",
@ -65,7 +65,7 @@ if (env['builtin_freetype'] != 'no'):
env.Append(CPPPATH=[thirdparty_dir, thirdparty_dir + "/include"])
# also requires libpng headers
if (env['builtin_libpng'] != 'no'):
if env['builtin_libpng']:
env.Append(CPPPATH=["#thirdparty/libpng"])
lib = env.Library("freetype_builtin", thirdparty_sources)

View file

@ -6,7 +6,7 @@ Import('env_modules')
env_ogg = env_modules.Clone()
# Thirdparty source files
if (env['builtin_libogg'] != 'no'):
if env['builtin_libogg']:
thirdparty_dir = "#thirdparty/libogg/"
thirdparty_sources = [
"bitwise.c",

View file

@ -6,7 +6,7 @@ Import('env_modules')
env_openssl = env_modules.Clone()
# Thirdparty source files
if (env['builtin_openssl'] != 'no'):
if env['builtin_openssl']:
thirdparty_dir = "#thirdparty/openssl/"
thirdparty_sources = [

View file

@ -6,7 +6,7 @@ Import('env_modules')
env_opus = env_modules.Clone()
# Thirdparty source files
if (env['builtin_opus'] != 'no'):
if env['builtin_opus']:
thirdparty_dir = "#thirdparty/opus/"
thirdparty_sources = [
@ -209,7 +209,7 @@ if (env['builtin_opus'] != 'no'):
env_opus.Append(CPPPATH=[thirdparty_dir + "/" + dir for dir in thirdparty_include_paths])
# also requires libogg
if (env['builtin_libogg'] != 'no'):
if env['builtin_libogg']:
env_opus.Append(CPPPATH=["#thirdparty/libogg"])
# Module files

View file

@ -5,7 +5,7 @@ Import('env')
# Not building in a separate env as core needs it
# Thirdparty source files
if (env['builtin_recast'] != 'no'):
if env['builtin_recast']:
thirdparty_dir = "#thirdparty/recastnavigation/Recast/"
thirdparty_sources = [
"Source/Recast.cpp",
@ -24,10 +24,6 @@ if (env['builtin_recast'] != 'no'):
env.Append(CPPPATH=[thirdparty_dir, thirdparty_dir + "/Include"])
# also requires recast headers
if (env['builtin_recast'] != 'no'):
env.Append(CPPPATH=["#thirdparty/recastnavigation/Recast"])
lib = env.Library("recast_builtin", thirdparty_sources)
env.Append(LIBS=[lib])

View file

@ -7,7 +7,7 @@ env_regex = env_modules.Clone()
env_regex.Append(CPPFLAGS=["-DPCRE2_CODE_UNIT_WIDTH=0"])
env_regex.add_source_files(env.modules_sources, "*.cpp")
if (env['builtin_pcre2'] != 'no'):
if env['builtin_pcre2']:
jit_blacklist = ['javascript']
thirdparty_dir = '#thirdparty/pcre2/src/'
thirdparty_flags = ['-DPCRE2_STATIC', '-DHAVE_CONFIG_H']

View file

@ -6,7 +6,7 @@ Import('env_modules')
env_squish = env_modules.Clone()
# Thirdparty source files
if (env['builtin_squish'] != 'no'):
if env['builtin_squish']:
thirdparty_dir = "#thirdparty/squish/"
thirdparty_sources = [
"alpha.cpp",

View file

@ -6,6 +6,6 @@ def can_build(platform):
def configure(env):
# Tools only, disabled for non-tools
# TODO: Find a cleaner way to achieve that
if (env["tools"] == "no"):
env["module_squish_enabled"] = "no"
if not env['tools']:
env['module_squish_enabled'] = False
env.disabled_modules.append("squish")

View file

@ -6,7 +6,7 @@ Import('env_modules')
env_theora = env_modules.Clone()
# Thirdparty source files
if (env['builtin_libtheora'] != 'no'):
if env['builtin_libtheora']:
thirdparty_dir = "#thirdparty/libtheora/"
thirdparty_sources = [
#"analyze.c",
@ -74,9 +74,9 @@ if (env['builtin_libtheora'] != 'no'):
env_theora.Append(CPPPATH=[thirdparty_dir])
# also requires libogg and libvorbis
if (env['builtin_libogg'] != 'no'):
if env['builtin_libogg']:
env_theora.Append(CPPPATH=["#thirdparty/libogg"])
if (env['builtin_libvorbis'] != 'no'):
if env['builtin_libvorbis']:
env_theora.Append(CPPPATH=["#thirdparty/libvorbis"])
# Godot source files

View file

@ -6,6 +6,6 @@ def can_build(platform):
def configure(env):
# Tools only, disabled for non-tools
# TODO: Find a cleaner way to achieve that
if (env["tools"] == "no"):
env["module_tinyexr_enabled"] = "no"
if not env['tools']:
env['module_tinyexr_enabled'] = False
env.disabled_modules.append("tinyexr")

View file

@ -6,7 +6,7 @@ Import('env_modules')
env_vorbis = env_modules.Clone()
# Thirdparty source files
if (env['builtin_libvorbis'] != 'no'):
if env['builtin_libvorbis']:
thirdparty_dir = "#thirdparty/libvorbis/"
thirdparty_sources = [
#"analysis.c",
@ -42,7 +42,7 @@ if (env['builtin_libvorbis'] != 'no'):
env_vorbis.Append(CPPPATH=[thirdparty_dir])
# also requires libogg
if (env['builtin_libogg'] != 'no'):
if env['builtin_libogg']:
env_vorbis.Append(CPPPATH=["#thirdparty/libogg"])
# Godot source files

View file

@ -19,14 +19,14 @@ env_webm.add_source_files(env.modules_sources, thirdparty_libsimplewebm_sources)
env_webm.Append(CPPPATH=[thirdparty_libsimplewebm_dir, thirdparty_libsimplewebm_dir + "libwebm/"])
# also requires libogg, libvorbis and libopus
if (env['builtin_libogg'] != 'no'):
if env['builtin_libogg']:
env_webm.Append(CPPPATH=["#thirdparty/libogg"])
if (env['builtin_libvorbis'] != 'no'):
if env['builtin_libvorbis']:
env_webm.Append(CPPPATH=["#thirdparty/libvorbis"])
if (env['builtin_opus'] != 'no'):
if env['builtin_opus']:
env_webm.Append(CPPPATH=["#thirdparty/opus"])
if (env['builtin_libvpx'] != 'no'):
if env['builtin_libvpx']:
Export('env_webm')
SConscript("libvpx/SCsub")

View file

@ -265,7 +265,7 @@ if env["platform"] == 'uwp':
else:
import platform
is_x11_or_server_arm = ((env["platform"] == 'x11' or env["platform"] == 'server') and platform.machine().startswith('arm'))
is_ios_x86 = (env["platform"] == 'iphone' and env["ios_sim"] == "yes")
is_ios_x86 = (env["platform"] == 'iphone' and env["ios_sim"])
is_android_x86 = (env["platform"] == 'android' and env["android_arch"] == 'x86')
if is_android_x86:
cpu_bits = '32'

View file

@ -6,7 +6,7 @@ Import('env_modules')
env_webp = env_modules.Clone()
# Thirdparty source files
if (env['builtin_libwebp'] != 'no'):
if env['builtin_libwebp']:
thirdparty_dir = "#thirdparty/libwebp/"
thirdparty_sources = [
"dec/alpha_dec.c",