diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2016-10-15 12:39:28 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2016-10-15 18:10:18 +0200 |
commit | 248bc9159c0b515e3e276db644744161283881ef (patch) | |
tree | 88cb5af9ad9382c8643ec810d5d0a9b8370d7e4b /drivers/png/SCsub | |
parent | edbc0c0d0bed169b3c07ef0f504b97936f0dab37 (diff) |
drivers: Refactor SCsub and drop redundant env_drivers clone
The reordering of the SConscript includes allows to ensure that
stuff like the builtin zlib headers will be available for libpng.
Also moved glew back into global env, otherwise windows seems
not to find it... Kind of shooting in the dark with this multi-env
setup.
Diffstat (limited to 'drivers/png/SCsub')
-rw-r--r-- | drivers/png/SCsub | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/drivers/png/SCsub b/drivers/png/SCsub index 1ab42a6db9..d1dab15ed4 100644 --- a/drivers/png/SCsub +++ b/drivers/png/SCsub @@ -1,8 +1,8 @@ Import('env') -Import('env_drivers') -# Thirdparty source files +env_png = env.Clone() +# Thirdparty source files if (env["libpng"] == "builtin"): thirdparty_dir = "#thirdparty/libpng/" thirdparty_sources = [ @@ -26,24 +26,21 @@ if (env["libpng"] == "builtin"): # Currently .ASM filter_neon.S does not compile on NT. import os if ("neon_enabled" in env and env["neon_enabled"]) and os.name!="nt": - env_drivers.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=2"]) - env_neon = env_drivers.Clone(); + env_png.Append(CPPFLAGS = ["-DPNG_ARM_NEON_OPT=2"]) + env_neon = env_png.Clone(); if "S_compiler" in env: env_neon['CC'] = env['S_compiler'] - #env_neon.Append(CPPFLAGS=["-DPNG_ARM_NEON"]) + #env_neon.Append(CPPFLAGS = ["-DPNG_ARM_NEON"]) thirdparty_sources.append(env_neon.Object(thirdparty_dir + "/arm/arm_init.c")) thirdparty_sources.append(env_neon.Object(thirdparty_dir + "/arm/filter_neon.S")) else: - env_drivers.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=0"]) + env_png.Append(CPPFLAGS = ["-DPNG_ARM_NEON_OPT=0"]) - #env_drivers.add_source_files(env.drivers_sources, thirdparty_sources) + #env_png.add_source_files(env.drivers_sources, thirdparty_sources) env.drivers_sources += thirdparty_sources # Concatenation necessary for neon objects it seems? - env_drivers.Append(CPPPATH = [thirdparty_dir]) - - -# Godot's own source files + env_png.Append(CPPPATH = [thirdparty_dir]) -env_drivers.add_source_files(env.drivers_sources, "*.cpp") +# Godot source files +env_png.add_source_files(env.drivers_sources, "*.cpp") -Export('env_drivers') Export('env') |