@@ -37,24 +37,27 @@ def find_usermod(mod: str):
37
37
# Save the old value
38
38
cpl = env .ConfigureProjectLibBuilder
39
39
# Our new wrapper
40
- def cpl_wrapper (env ):
41
- # Update usermod properties
42
- lib_builders = env .GetLibBuilders ()
40
+ def cpl_wrapper (xenv ):
41
+ # Update usermod properties
42
+ lib_builders = xenv .GetLibBuilders ()
43
+ wled_dir = xenv ["PROJECT_SRC_DIR" ]
43
44
um_deps = [dep for dep in lib_builders if usermod_dir in Path (dep .src_dir ).parents ]
44
45
other_deps = [dep for dep in lib_builders if usermod_dir not in Path (dep .src_dir ).parents ]
46
+ print (xenv .Dump ())
45
47
for um in um_deps :
46
48
# Add include paths for all non-usermod dependencies
47
49
for dep in other_deps :
48
50
for dir in dep .get_include_dirs ():
49
51
um .env .PrependUnique (CPPPATH = dir )
50
- # Add the wled folder to the include path
51
- um .env .PrependUnique (CPPPATH = env ["PROJECT_SRC_DIR" ])
52
+ # Add the wled folder to the include path
53
+ print (f"{ str (um )} : adding { wled_dir } " )
54
+ um .env .PrependUnique (CPPPATH = wled_dir )
52
55
# Make sure we link directly, not through an archive
53
56
# Archives drop the .dtor table section we need
54
57
build = um ._manifest .get ("build" , {})
55
58
build ["libArchive" ] = False
56
59
um ._manifest ["build" ] = build
57
- return cpl .clone (env )()
60
+ return cpl .clone (xenv )()
58
61
59
62
60
63
# Replace the old one with ours
0 commit comments