mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
ide: pkg_config include paths in C++ parsing
git-svn-id: svn://ultimatepp.org/upp/trunk@13560 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
343b49695f
commit
fe032e5f3c
3 changed files with 11 additions and 5 deletions
|
|
@ -311,7 +311,6 @@ bool MakeBuild::BuildPackage(const Workspace& wspc, int pkindex, int pknumber, i
|
|||
for(int i = 0; i < wspc.GetCount(); i++)
|
||||
for(String h : Split(Gather(wspc.GetPackage(i).pkg_config, b->config.GetKeys()), ' '))
|
||||
b->pkg_config.FindAdd(h);
|
||||
DDUMP(b->pkg_config);
|
||||
const TargetMode& m = targetmode == 0 ? debug : release;
|
||||
b->version = m.version;
|
||||
b->method = method;
|
||||
|
|
|
|||
|
|
@ -130,9 +130,6 @@ bool GccBuilder::BuildPackage(const String& package, Vector<String>& linkfile, V
|
|||
|
||||
String cc = CmdLine(package, pkg);
|
||||
|
||||
DDUMP(pkg_config);
|
||||
DDUMP(cc);
|
||||
|
||||
if(HasFlag("WIN32")/* && HasFlag("MT")*/)
|
||||
cc << " -mthreads";
|
||||
if(HasFlag("DEBUG_MINIMAL"))
|
||||
|
|
|
|||
|
|
@ -877,13 +877,23 @@ String Ide::GetIncludePath()
|
|||
MergeWith(include, ";", cppIncludeDir);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const Workspace& wspc = GetIdeWorkspace();
|
||||
LocalHost dummy_host;
|
||||
One<Builder> b = CreateBuilder(&dummy_host);
|
||||
Index<String> pkg_config;
|
||||
for(int i = 0; i < wspc.GetCount(); i++) {
|
||||
const Package& pkg = wspc.GetPackage(i);
|
||||
for(int j = 0; j < pkg.include.GetCount(); j++)
|
||||
MergeWith(include, ";", SourcePath(wspc[i], pkg.include[j].text));
|
||||
for(String h : Split(Gather(pkg.pkg_config, b->config.GetKeys()), ' '))
|
||||
pkg_config.FindAdd(h);
|
||||
}
|
||||
|
||||
for(String s : pkg_config)
|
||||
for(String p : Split(Sys("pkg-config --cflags " + s), ' '))
|
||||
if(p.TrimStart("-I"))
|
||||
MergeWith(include, ";", p);
|
||||
|
||||
return include;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue