diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h index 49f22ea5e2..5efb1d7857 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h @@ -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