Allow custom variants directory
This commit is contained in:
parent
e41fb08b2a
commit
ac9fdeffe4
@ -194,16 +194,20 @@ if not env.BoardConfig().get("build.ldscript", ""):
|
|||||||
|
|
||||||
libs = []
|
libs = []
|
||||||
|
|
||||||
|
variants_dir = join(FRAMEWORK_DIR, "variants")
|
||||||
|
|
||||||
|
if "build.variants_dir" in env.BoardConfig():
|
||||||
|
variants_dir = join("$PROJECT_DIR", env.BoardConfig().get("build.variants_dir"))
|
||||||
|
|
||||||
if "build.variant" in env.BoardConfig():
|
if "build.variant" in env.BoardConfig():
|
||||||
env.Append(
|
env.Append(
|
||||||
CPPPATH=[
|
CPPPATH=[
|
||||||
join(FRAMEWORK_DIR, "variants",
|
join(variants_dir, env.BoardConfig().get("build.variant"))
|
||||||
env.BoardConfig().get("build.variant"))
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
libs.append(env.BuildLibrary(
|
libs.append(env.BuildLibrary(
|
||||||
join("$BUILD_DIR", "FrameworkArduinoVariant"),
|
join("$BUILD_DIR", "FrameworkArduinoVariant"),
|
||||||
join(FRAMEWORK_DIR, "variants", env.BoardConfig().get("build.variant"))
|
join(variants_dir, env.BoardConfig().get("build.variant"))
|
||||||
))
|
))
|
||||||
|
|
||||||
envsafe = env.Clone()
|
envsafe = env.Clone()
|
||||||
|
Loading…
Reference in New Issue
Block a user