Browse Source

Projucer: Added more thorough checking of pkg-config dependencies

tags/2021-05-28
tpoole 7 years ago
parent
commit
13ccdf9411
1 changed files with 5 additions and 12 deletions
  1. +5
    -12
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h

+ 5
- 12
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h View File

@@ -683,18 +683,14 @@ private:
out << getPhonyTargetLine() << newLine << newLine;
StringArray packages;
packages.addTokens (getExtraPkgConfigString(), " ", "\"'");
packages.removeEmptyStrings();
const bool useLinuxPackages = (linuxPackages.size() > 0 || packages.size() > 0);
auto packages = getPackages();
writeTargetLines (out, useLinuxPackages);
writeTargetLines (out, ! packages.isEmpty());
for (auto target : targets)
target->addFiles (out);
if (useLinuxPackages)
if (! packages.isEmpty())
{
out << "check-pkg-config:" << newLine
<< "\t@command -v pkg-config >/dev/null 2>&1 || "
@@ -702,11 +698,8 @@ private:
"exit 1; }" << newLine
<< "\t@pkg-config --print-errors";
for (int i = 0; i < linuxPackages.size(); ++i)
out << " " << linuxPackages[i];
for (int i = 0; i < packages.size(); ++i)
out << " " << packages[i];
for (auto& pkg : packages)
out << " " << pkg;
out << newLine << newLine;
}


Loading…
Cancel
Save