diff --git a/uppsrc/ide/Builders/Build.cpp b/uppsrc/ide/Builders/Build.cpp index aa4f867d8..1357ba91c 100644 --- a/uppsrc/ide/Builders/Build.cpp +++ b/uppsrc/ide/Builders/Build.cpp @@ -282,6 +282,12 @@ One MakeBuild::CreateBuilder(Host *host) b->host = host; b->compiler = bm.Get("COMPILER", ""); b->include = SplitDirs(GetVar("UPP") + ';' + bm.Get("INCLUDE", "")); + const Workspace& wspc = GetIdeWorkspace(); + for(int i = 0; i < wspc.GetCount(); i++) { + const Package& pkg = wspc.GetPackage(i); + for(int j = 0; j < pkg.include.GetCount(); j++) + b->include.Add(SourcePath(wspc[i], pkg.include[j].text)); + } b->libpath = SplitDirs(bm.Get("LIB", "")); b->debug_options = bm.Get("DEBUG_OPTIONS", ""); b->release_options = bm.Get("RELEASE_OPTIONS", ""); diff --git a/uppsrc/ide/Builders/CppBuilder.cpp b/uppsrc/ide/Builders/CppBuilder.cpp index a915ef76e..4fd5d5f89 100644 --- a/uppsrc/ide/Builders/CppBuilder.cpp +++ b/uppsrc/ide/Builders/CppBuilder.cpp @@ -335,11 +335,6 @@ String CppBuilder::Includes(const char *sep, const String& package, const Packag String cc; for(int i = 0; i < include.GetCount(); i++) cc << sep << GetHostPathQ(include[i]); - for(int i = 0; i < pkg.include.GetCount(); i++) { - const OptItem& m = pkg.include[i]; - if(MatchWhen(m.when, config.GetKeys())) - cc << sep << GetHostPathQ(SourcePath(package, m.text)); - } return cc; } @@ -348,11 +343,6 @@ String CppBuilder::IncludesShort(const char *sep, const String& package, const P String cc; for(int i = 0; i < include.GetCount(); i++) cc << sep << GetHostPathShortQ(include[i]); - for(int i = 0; i < pkg.include.GetCount(); i++) { - const OptItem& m = pkg.include[i]; - if(MatchWhen(m.when, config.GetKeys())) - cc << sep << GetHostPathShortQ(SourcePath(package, m.text)); - } return cc; } diff --git a/uppsrc/ide/UppDlg.cpp b/uppsrc/ide/UppDlg.cpp index a8e66b7f0..edac35039 100644 --- a/uppsrc/ide/UppDlg.cpp +++ b/uppsrc/ide/UppDlg.cpp @@ -140,7 +140,7 @@ void PackageEditor::OptionAdd(ArrayCtrl& option, int type, const char *title, co { if(o.GetCount() == 0) return; - option.Add(-1, -1, "when", title); + option.Add(-1, -1, type == INCLUDE ? "" : "when", title); option.SetDisplay(option.GetCount() - 1, 0, Single()); option.SetDisplay(option.GetCount() - 1, 1, Single()); for(int i = 0; i < o.GetCount(); i++) { @@ -248,6 +248,7 @@ void PackageEditor::AddOption(int type) WithUppOptDlg dlg; CtrlLayoutOKCancel(dlg, opt_name[type]); dlg.when.SetFilter(CondFilter); + dlg.when.Enable(type != INCLUDE); if(dlg.Run() != IDOK) return; SetOpt(option, type, opt[type]->Add(), ~dlg.when, ~dlg.text); @@ -290,6 +291,7 @@ void PackageEditor::EditOption() if(i >= 0 && i < m.GetCount()) { WithUppOptDlg dlg; CtrlLayoutOKCancel(dlg, opt_name[type]); + dlg.when.Enable(type != INCLUDE); dlg.when <<= m[i].when; dlg.text <<= m[i].text; if(dlg.Run() != IDOK)