From ef4f0f3bc908fde009a3da7a255c0a0f098b0c4b Mon Sep 17 00:00:00 2001 From: PaulStoffregen Date: Mon, 10 Feb 2014 14:18:47 -0800 Subject: [PATCH] If 2 libs have same .h file, use the lib with same dir name --- app/src/processing/app/Base.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 2312c880f..29540399b 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -1245,6 +1245,13 @@ public class Base { 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) {