mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Add a PKG_CONFIG environment variable to Linux Makefiles
This commit is contained in:
parent
3fe0716684
commit
30a516898c
1 changed files with 9 additions and 4 deletions
|
|
@ -306,8 +306,8 @@ public:
|
|||
|
||||
if (! packages.isEmpty())
|
||||
{
|
||||
out << "\t@command -v pkg-config >/dev/null 2>&1 || { echo >&2 \"pkg-config not installed. Please, install it.\"; exit 1; }" << newLine
|
||||
<< "\t@pkg-config --print-errors";
|
||||
out << "\t@command -v $(PKG_CONFIG) >/dev/null 2>&1 || { echo >&2 \"pkg-config not installed. Please, install it.\"; exit 1; }" << newLine
|
||||
<< "\t@$(PKG_CONFIG) --print-errors";
|
||||
|
||||
for (auto& pkg : packages)
|
||||
out << " " << pkg;
|
||||
|
|
@ -562,7 +562,7 @@ private:
|
|||
auto compilePackages = getCompilePackages();
|
||||
|
||||
if (compilePackages.size() > 0)
|
||||
return "$(shell pkg-config --cflags " + compilePackages.joinIntoString (" ") + ")";
|
||||
return "$(shell $(PKG_CONFIG) --cflags " + compilePackages.joinIntoString (" ") + ")";
|
||||
|
||||
return {};
|
||||
}
|
||||
|
|
@ -572,7 +572,7 @@ private:
|
|||
auto linkPackages = getLinkPackages();
|
||||
|
||||
if (linkPackages.size() > 0)
|
||||
return "$(shell pkg-config --libs " + linkPackages.joinIntoString (" ") + ")";
|
||||
return "$(shell $(PKG_CONFIG) --libs " + linkPackages.joinIntoString (" ") + ")";
|
||||
|
||||
return {};
|
||||
}
|
||||
|
|
@ -935,6 +935,11 @@ private:
|
|||
<< "DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD)" << newLine
|
||||
<< newLine;
|
||||
|
||||
out << "ifndef PKG_CONFIG" << newLine
|
||||
<< " PKG_CONFIG=pkg-config" << newLine
|
||||
<< "endif" << newLine
|
||||
<< newLine;
|
||||
|
||||
out << "ifndef STRIP" << newLine
|
||||
<< " STRIP=strip" << newLine
|
||||
<< "endif" << newLine
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue