summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src/osd/modules.lua
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-04-13 18:47:33 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2015-04-13 18:51:07 +0200
commitf6fbdaa2e86de0e96f079b22aeebb26e5eef2c56 (patch)
treec9099fdfe76e3141970bb34a689438660babc009 /scripts/src/osd/modules.lua
parent5f7639921651a3f02bdd04c661eabffa12d7b346 (diff)
Added QT_HOME to support custom QT installations (nw)
Diffstat (limited to 'scripts/src/osd/modules.lua')
-rw-r--r--scripts/src/osd/modules.lua55
1 files changed, 41 insertions, 14 deletions
diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua
index 0617939154e..3fe914f3444 100644
--- a/scripts/src/osd/modules.lua
+++ b/scripts/src/osd/modules.lua
@@ -105,15 +105,24 @@ function osdmodulesbuild()
if (os.is("windows")) then
MOC = "moc"
else
- MOCTST = backtick("which moc-qt4 2>/dev/null")
- if (MOCTST=='') then
- MOCTST = backtick("which moc 2>/dev/null")
+ if _OPTIONS["QT_HOME"]~=nil then
+ QMAKETST = backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake --version 2>/dev/null")
+ if (QMAKETST=='') then
+ print("Qt's Meta Object Compiler (moc) wasn't found!")
+ os.exit(1)
+ end
+ MOC = _OPTIONS["QT_HOME"] .. "/bin/moc"
+ else
+ MOCTST = backtick("which moc-qt4 2>/dev/null")
+ if (MOCTST=='') then
+ MOCTST = backtick("which moc 2>/dev/null")
+ end
+ if (MOCTST=='') then
+ print("Qt's Meta Object Compiler (moc) wasn't found!")
+ os.exit(1)
+ end
+ MOC = MOCTST
end
- if (MOCTST=='') then
- print("Qt's Meta Object Compiler (moc) wasn't found!")
- os.exit(1)
- end
- MOC = MOCTST
end
@@ -141,9 +150,15 @@ function osdmodulesbuild()
"-F" .. backtick("qmake -query QT_INSTALL_LIBS"),
}
else
- buildoptions {
- backtick("pkg-config --cflags QtGui"),
- }
+ if _OPTIONS["QT_HOME"]~=nil then
+ buildoptions {
+ "-I" .. backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_INSTALL_HEADERS"),
+ }
+ else
+ buildoptions {
+ backtick("pkg-config --cflags QtGui"),
+ }
+ end
end
else
defines {
@@ -205,9 +220,15 @@ function osdmodulestargetconf()
"QtGui.framework",
}
else
- linkoptions {
- backtick("pkg-config --libs QtGui"),
- }
+ if _OPTIONS["QT_HOME"]~=nil then
+ buildoptions {
+ "-I" .. backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_INSTALL_LIBS"),
+ }
+ else
+ linkoptions {
+ backtick("pkg-config --libs QtGui"),
+ }
+ end
end
end
@@ -294,6 +315,12 @@ newoption {
},
}
+newoption {
+ trigger = "QT_HOME",
+ description = "QT lib location",
+}
+
+
if not _OPTIONS["USE_QTDEBUG"] then
if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="solaris" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"] == "emscripten" or _OPTIONS["targetos"] == "os2" then
_OPTIONS["USE_QTDEBUG"] = "0"