Skip to content

Commit

Permalink
If 2 libs have same .h file, use the lib with same dir name
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulStoffregen committed Feb 10, 2014
1 parent 5dfafe7 commit ef4f0f3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/src/processing/app/Base.java
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,13 @@ public void actionPerformed(ActionEvent event) {
String packages[] =
Compiler.headerListFromIncludePath(subfolder.getAbsolutePath());
for (String pkg : packages) {
File old = importToLibraryTable.get(pkg);
if (old != null) {
// If a library was already found with this header, keep it if
// the library's directory name matches the header name.
String name = pkg.substring(0, pkg.length() - 2);
if (old.getPath().endsWith(name)) continue;
}
importToLibraryTable.put(pkg, subfolder);
}
} catch (IOException e) {
Expand Down

0 comments on commit ef4f0f3

Please sign in to comment.