mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-15 12:29:26 +01:00
Reference libraries in hardware addons when they reference another core.
Fixes #1445
This commit is contained in:
parent
8e3da56624
commit
be30113f09
@ -1230,6 +1230,15 @@ public class Base {
|
|||||||
File platformFolder = targetPlatform.getFolder();
|
File platformFolder = targetPlatform.getFolder();
|
||||||
librariesFolders = new ArrayList<File>();
|
librariesFolders = new ArrayList<File>();
|
||||||
librariesFolders.add(getContentFile("libraries"));
|
librariesFolders.add(getContentFile("libraries"));
|
||||||
|
String core = getBoardPreferences().get("build.core");
|
||||||
|
if (core.contains(":")) {
|
||||||
|
String referencedCore = core.split(":")[0];
|
||||||
|
TargetPlatform referencedPlatform = Base.getTargetPlatform(referencedCore, targetPlatform.getId());
|
||||||
|
if (referencedPlatform != null) {
|
||||||
|
File referencedPlatformFolder = referencedPlatform.getFolder();
|
||||||
|
librariesFolders.add(new File(referencedPlatformFolder, "libraries"));
|
||||||
|
}
|
||||||
|
}
|
||||||
librariesFolders.add(new File(platformFolder, "libraries"));
|
librariesFolders.add(new File(platformFolder, "libraries"));
|
||||||
librariesFolders.add(getSketchbookLibrariesFolder());
|
librariesFolders.add(getSketchbookLibrariesFolder());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user