Project structure redefined
This commit is contained in:
17
convert_sysincludes.py
Normal file
17
convert_sysincludes.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from pathlib import Path
|
||||
Import("env" ,"projenv")
|
||||
|
||||
platform = env.PioPlatform()
|
||||
FRAMEWORK_DIR = Path(platform.get_package_dir("framework-arduinoespressif32"))
|
||||
framework_includes = list()
|
||||
filtered_cpppath = list()
|
||||
# apply these changes to current working env, the project env and the global env
|
||||
for e in (env, projenv, DefaultEnvironment()):
|
||||
for p in e["CPPPATH"]:
|
||||
# is the current include path inside the framework directory?
|
||||
if FRAMEWORK_DIR in Path(p).parents:
|
||||
framework_includes.append(p)
|
||||
else:
|
||||
filtered_cpppath.append(p)
|
||||
e.Replace(CPPPATH=filtered_cpppath)
|
||||
e.Append(CCFLAGS=[("-isystem", p) for p in framework_includes])
|
||||
Reference in New Issue
Block a user