summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src/osd/modules.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/src/osd/modules.lua')
-rw-r--r--scripts/src/osd/modules.lua14
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua
index 7b24531fbf5..ed03ecdf15d 100644
--- a/scripts/src/osd/modules.lua
+++ b/scripts/src/osd/modules.lua
@@ -35,6 +35,14 @@ function addoptionsfromstring(str)
end
end
+function pkgconfigcmd()
+ local pkgconfig = os.getenv("PKG_CONFIG")
+ if pkgconfig == nil then
+ return "pkg-config"
+ end
+ return pkgconfig
+end
+
function osdmodulesbuild()
removeflags {
@@ -343,7 +351,7 @@ function qtdebuggerbuild()
}
else
buildoptions {
- backtick("pkg-config --cflags Qt5Widgets"),
+ backtick(pkgconfigcmd() .. " --cflags Qt5Widgets"),
}
end
end
@@ -378,7 +386,7 @@ function osdmodulestargetconf()
if _OPTIONS["NO_USE_MIDI"]~="1" then
if _OPTIONS["targetos"]=="linux" then
- local str = backtick("pkg-config --libs alsa")
+ local str = backtick(pkgconfigcmd() .. " --libs alsa")
addlibfromstring(str)
addoptionsfromstring(str)
elseif _OPTIONS["targetos"]=="macosx" then
@@ -419,7 +427,7 @@ function osdmodulestargetconf()
"Qt5Widgets",
}
else
- local str = backtick("pkg-config --libs Qt5Widgets")
+ local str = backtick(pkgconfigcmd() .. " --libs Qt5Widgets")
addlibfromstring(str)
addoptionsfromstring(str)
end