diff options
author | 2016-07-16 06:04:52 -0400 | |
---|---|---|
committer | 2016-07-16 06:04:52 -0400 | |
commit | 72b19e0c256aa3f10704d76912d0d8443be9d42f (patch) | |
tree | 55e5b3c3bb3cf6216f5dd22111544a5c4335474c /scripts/src/osd/modules.lua | |
parent | e3a81674d2341d2a3224fcc754de6b563e1f898b (diff) | |
parent | cb5495f738679b3f4b2a035d2e3957f198eecc1c (diff) |
Merge pull request #1072 from oxc/pkg_config_from_env
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 95a7fc38905..25a7aca2c0e 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 { @@ -344,7 +352,7 @@ function qtdebuggerbuild() } else buildoptions { - backtick("pkg-config --cflags Qt5Widgets"), + backtick(pkgconfigcmd() .. " --cflags Qt5Widgets"), } end end @@ -379,7 +387,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 @@ -420,7 +428,7 @@ function osdmodulestargetconf() "Qt5Widgets", } else - local str = backtick("pkg-config --libs Qt5Widgets") + local str = backtick(pkgconfigcmd() .. " --libs Qt5Widgets") addlibfromstring(str) addoptionsfromstring(str) end |