File tree 1 file changed +8
-2
lines changed 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -321,9 +321,15 @@ def configure_network_flags(cpp_defines):
321
321
322
322
variant = board .get ("build.arduino.earlephilhower.variant" , board .get ("build.variant" , "" ))
323
323
324
+ # The following 3 lines are adapted from espressif/arduino-esp32, also licensed under apache2
325
+ variants_dir = os .path .join (FRAMEWORK_DIR , "variants" )
326
+
327
+ if "build.variants_dir" in board :
328
+ variants_dir = os .path .join ("$PROJECT_DIR" , board .get ("build.variants_dir" ))
329
+
324
330
if variant != "" :
325
331
env .Append (CPPPATH = [
326
- os .path .join (FRAMEWORK_DIR , "variants" , variant )
332
+ os .path .join (variants_dir , variant )
327
333
])
328
334
329
335
env .Append (CPPDEFINES = [
@@ -335,7 +341,7 @@ def configure_network_flags(cpp_defines):
335
341
# otherwise weak function overriding won't work in the linking stage.
336
342
env .BuildSources (
337
343
os .path .join ("$BUILD_DIR" , "FrameworkArduinoVariant" ),
338
- os .path .join (FRAMEWORK_DIR , "variants" , variant ))
344
+ os .path .join (variants_dir , variant ))
339
345
340
346
libs .append (
341
347
env .BuildLibrary (
You can’t perform that action at this time.
0 commit comments