From aec45f5e1123ba0461ac89a4e6f5692e3284a79b Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Mon, 25 Aug 2014 04:37:59 +0200 Subject: [PATCH] invalid libman entries are not passed anymore. --- src/ce_libman.pas | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/ce_libman.pas b/src/ce_libman.pas index ca5dcade..2c72cfa7 100644 --- a/src/ce_libman.pas +++ b/src/ce_libman.pas @@ -78,9 +78,12 @@ begin itm := TLibraryItem(fCol.Items[i]); ce_dcd.addDcdImport(itm.libSourcePath); end; - end; +(** + * the caller gets all the *.lib/*.a files in aList if someAliases is nil + * otherwise the static libs selected by the aliases in someAliases. + *) procedure TLibraryManager.getLibFiles(const someAliases, aList: TStrings); var itm: TLibraryItem; @@ -91,11 +94,15 @@ begin begin itm := TLibraryItem(fCol.Items[i]); if someAliases <> nil then - if someAliases.IndexOf(itm.libAlias) = -1 then continue; + if someAliases.IndexOf(itm.libAlias) = -1 then + continue; // single lib files if fileExists(itm.libFile) then begin - if aList.IndexOf(itm.libFile) <> -1 then continue; + if aList.IndexOf(itm.libFile) <> -1 then + continue; + if not FileExists(itm.libFile) then + continue; aList.Add(itm.libFile); end // folder of lib file @@ -117,6 +124,10 @@ begin end; end; +(** + * the caller gets all the paths were are located the lib sources in aList if someAliases is nil + * otherwise the paths were are located the lib sources selected by the aliases in someAliases. + *) procedure TLibraryManager.getLibSources(const someAliases, aList: TStrings); var itm: TLibraryItem; @@ -126,9 +137,13 @@ begin begin itm := TLibraryItem(fCol.Items[i]); if someAliases <> nil then - if someAliases.IndexOf(itm.libAlias) = -1 then continue; + if someAliases.IndexOf(itm.libAlias) = -1 then + continue; // - if aList.IndexOf(itm.libSourcePath) <> -1 then continue; + if aList.IndexOf(itm.libSourcePath) <> -1 then + continue; + if not directoryExists(itm.libSourcePath) then + continue; aList.Add('-I' + itm.libSourcePath); end; end;