From 52eec572d20cf88ef3cf12ebeba72e1e89e4a02a Mon Sep 17 00:00:00 2001 From: Patrick Dawson Date: Sat, 20 Apr 2024 06:51:41 +0200 Subject: [PATCH] try 2 --- gdext/SConstruct | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gdext/SConstruct b/gdext/SConstruct index 99ebb9d..a4608bf 100644 --- a/gdext/SConstruct +++ b/gdext/SConstruct @@ -6,13 +6,16 @@ import shutil import subprocess import SCons + class CustomCacheDir(SCons.CacheDir.CacheDir): @classmethod def copy_to_cache(cls, env, src, dst) -> str: - if str(src).startswith("godot-cpp"): - return super().copy_to_cache(env, src, dst) - else: - return None + fn = str(src) + if fn.startswith("godot-cpp"): + if os.path.splitext(fn)[1] not in [".lib", ".dll", ".exp", ".a", ".so"]: + return super().copy_to_cache(env, src, dst) + return None + env = SConscript("godot-cpp/SConstruct") env.CacheDir("scons_cache", CustomCacheDir)