-#include <algorithm>
+#include <msp/core/algorithm.h>
#include <msp/io/print.h>
#include <msp/strings/utils.h>
#include "binarypackage.h"
Flags exclusive_static_flags;
for(const string &f: static_flags)
- if(find(flags.begin(), flags.end(), f)==flags.end())
+ if(!any_equals(flags, f))
exclusive_static_flags.push_back(f);
process_flags(exclusive_static_flags, pkg->static_binfo);
bool has_relative_paths = any_of(export_binfo.libpath.begin(), export_binfo.libpath.end(), is_relative) ||
any_of(export_binfo.incpath.begin(), export_binfo.incpath.end(), is_relative);
- list<FS::Path> bases;
+ vector<FS::Path> bases;
/* If we have any relative paths that need resolving, or we have no paths at
all and are not using pkg-config, look for files in prefix */
prefix /= arch.get_cross_prefix();
}
- BuildInfo::PathList libpath = export_binfo.libpath;
+ VirtualFileSystem::SearchPath libpath = export_binfo.libpath;
if(!system && libpath.empty())
libpath.push_back("lib");
for(FS::Path &p: libpath)
for(const string &l: export_binfo.libs)
all_found &= (builder.get_vfs().find_library(l, libpath, export_binfo.libmode, system)!=0);
- BuildInfo::PathList incpath = export_binfo.incpath;
+ VirtualFileSystem::SearchPath incpath = export_binfo.incpath;
if(!system && incpath.empty())
incpath.push_back("include");
for(FS::Path &p: incpath)
if(all_found)
{
base_path = prefix;
- builder.get_logger().log("configure", format("%s found in %s", name, ((system && use_pkgconfig) ? "system" : base_path.str())));
+ builder.get_logger().log("configure", "%s found in %s", name, ((system && use_pkgconfig) ? "system" : base_path.str()));
break;
}
}
if(base_path.empty())
{
// TODO report which files were not found
- builder.get_logger().log("problems", format("Cannot locate files for %s", name));
+ builder.get_logger().log("problems", "Cannot locate files for %s", name);
problems.push_back("Cannot locate files");
return;
}
if(!static_binfo.libs.empty())
{
- BuildInfo::PathList combined_libpath = static_binfo.libpath;
+ VirtualFileSystem::SearchPath combined_libpath = static_binfo.libpath;
combined_libpath.insert(combined_libpath.end(), export_binfo.libpath.begin(), export_binfo.libpath.end());
for(const string &l: export_binfo.libs)