summaryrefslogtreecommitdiff
path: root/drivers/png/SCsub
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/png/SCsub')
-rw-r--r--drivers/png/SCsub19
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/png/SCsub b/drivers/png/SCsub
index db08be0c47..26508dc612 100644
--- a/drivers/png/SCsub
+++ b/drivers/png/SCsub
@@ -5,6 +5,9 @@ Import("env")
env_png = env.Clone()
# Thirdparty source files
+
+thirdparty_obj = []
+
if env["builtin_libpng"]:
thirdparty_dir = "#thirdparty/libpng/"
thirdparty_sources = [
@@ -41,7 +44,7 @@ if env["builtin_libpng"]:
env_thirdparty = env_png.Clone()
env_thirdparty.disable_warnings()
- env_thirdparty.add_source_files(env.drivers_sources, thirdparty_sources)
+ env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
if use_neon:
env_neon = env_thirdparty.Clone()
@@ -52,9 +55,17 @@ if env["builtin_libpng"]:
neon_sources.append(env_neon.Object(thirdparty_dir + "/arm/filter_neon_intrinsics.c"))
neon_sources.append(env_neon.Object(thirdparty_dir + "/arm/filter_neon.S"))
neon_sources.append(env_neon.Object(thirdparty_dir + "/arm/palette_neon_intrinsics.c"))
- env.drivers_sources += neon_sources
+ thirdparty_obj += neon_sources
+
+ env.drivers_sources += thirdparty_obj
+
# Godot source files
-env_png.add_source_files(env.drivers_sources, "*.cpp")
-Export("env")
+driver_obj = []
+
+env_png.add_source_files(driver_obj, "*.cpp")
+env.drivers_sources += driver_obj
+
+# Needed to force rebuilding the driver files when the thirdparty library is updated.
+env.Depends(driver_obj, thirdparty_obj)