summaryrefslogtreecommitdiff
path: root/xmake/rules
diff options
context:
space:
mode:
authorruki <[email protected]>2018-04-15 15:38:40 +0800
committerruki <[email protected]>2018-04-15 15:38:40 +0800
commitdfb2e572d6ce2675c0a4925f4dee7dd483365ce8 (patch)
tree70a6d65223f3dc47eef097984218553ff4daf465 /xmake/rules
parentc2534e6c6bee1c54e0dbd7f54d06444d1835c69c (diff)
improve find qt
Diffstat (limited to 'xmake/rules')
-rw-r--r--xmake/rules/qt/console/load.lua29
1 files changed, 4 insertions, 25 deletions
diff --git a/xmake/rules/qt/console/load.lua b/xmake/rules/qt/console/load.lua
index d93f5e425..8d752b9cd 100644
--- a/xmake/rules/qt/console/load.lua
+++ b/xmake/rules/qt/console/load.lua
@@ -26,35 +26,11 @@
import("core.project.config")
import("detect.sdks.find_qt")
--- check the qt sdk directory
-function check_qt()
-
- -- get the qt sdk
- local qt_sdkdir = config.get("qt_sdkdir")
- if not qt_sdkdir then
-
- -- check ok? update it
- local qt = find_qt()
- if qt then
-
- -- save it
- config.set("qt_sdkdir", qt.sdkdir)
-
- -- trace
- cprint("checking for the Qt SDK directory ... ${green}%s", qt.sdkdir)
- else
-
- -- trace
- cprint("checking for the Qt SDK directory ... ${red}no")
- end
- end
-end
-
-- the main entry
function main(target)
-- check qt sdk
- check_qt()
+ local qt = assert(find_qt(nil, {verbose = true}), "Qt SDK not found!")
-- set kind: binary
target:set("kind", "binary")
@@ -76,4 +52,7 @@ function main(target)
-- depend on your compiler). Please consult the documentation of the
-- deprecated API in order to know how to port your code away from it.
target:add("defines", "QT_DEPRECATED_WARNINGS")
+
+ -- add framework directories
+ target:add("frameworkdirs", qt.libdir)
end