diff options
author | 2016-07-09 21:31:01 +0200 | |
---|---|---|
committer | 2016-07-09 22:49:30 +0200 | |
commit | cb5495f738679b3f4b2a035d2e3957f198eecc1c (patch) | |
tree | ea0f348ff3df7202edb2a085f8632dca3f9ed40d /scripts/src/osd/modules.lua | |
parent | 72a499b54a7dd20fcab34d5b541e0f12ea23c8c5 (diff) |
Take pkg-config path from env if defined
Diffstat (limited to 'scripts/src/osd/modules.lua')
-rw-r--r-- | scripts/src/osd/modules.lua | 14 |
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 |