Skip to content

Commit be30113

Browse files
committed
Reference libraries in hardware addons when they reference another core.
Fixes #1445
1 parent 8e3da56 commit be30113

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/src/processing/app/Base.java

+9
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,15 @@ public void onBoardOrPortChange() {
12301230
File platformFolder = targetPlatform.getFolder();
12311231
librariesFolders = new ArrayList<File>();
12321232
librariesFolders.add(getContentFile("libraries"));
1233+
String core = getBoardPreferences().get("build.core");
1234+
if (core.contains(":")) {
1235+
String referencedCore = core.split(":")[0];
1236+
TargetPlatform referencedPlatform = Base.getTargetPlatform(referencedCore, targetPlatform.getId());
1237+
if (referencedPlatform != null) {
1238+
File referencedPlatformFolder = referencedPlatform.getFolder();
1239+
librariesFolders.add(new File(referencedPlatformFolder, "libraries"));
1240+
}
1241+
}
12331242
librariesFolders.add(new File(platformFolder, "libraries"));
12341243
librariesFolders.add(getSketchbookLibrariesFolder());
12351244

0 commit comments

Comments
 (0)