1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Projucer: Added more thorough checking of pkg-config dependencies

This commit is contained in:
tpoole 2017-10-11 11:10:48 +01:00
parent 6867772374
commit 13ccdf9411

View file

@ -683,18 +683,14 @@ private:
out << getPhonyTargetLine() << newLine << newLine;
StringArray packages;
packages.addTokens (getExtraPkgConfigString(), " ", "\"'");
packages.removeEmptyStrings();
auto packages = getPackages();
const bool useLinuxPackages = (linuxPackages.size() > 0 || packages.size() > 0);
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;
}