summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-01-07 00:54:34 +0800
committerruki <[email protected]>2021-01-07 00:54:34 +0800
commitbda937a7a86502cdac84dc68b81fde62d6897722 (patch)
tree976ac923192536dd0cf85ec9e2a5665a44149eeb
parent4da6286a86e0367dd13e9ac5f226fae79bd4c1f9 (diff)
improve qt.ui rule
-rw-r--r--xmake/rules/qt/ui/xmake.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/rules/qt/ui/xmake.lua b/xmake/rules/qt/ui/xmake.lua
index 603bae04d..82a5095e6 100644
--- a/xmake/rules/qt/ui/xmake.lua
+++ b/xmake/rules/qt/ui/xmake.lua
@@ -34,9 +34,13 @@ rule("qt.ui")
local uic = path.join(target:data("qt").bindir, is_host("windows") and "uic.exe" or "uic")
assert(uic and os.isexec(uic), "uic not found!")
- -- add includedirs
+ -- add includedirs, @note we use sysincludedirs to suppress warning (file not found).
+ -- and we muse add it in load stage to ensure `depend.on_changed` work.
+ --
+ -- @see https://github.com/xmake-io/xmake/issues/1180
+ --
local headerfile_dir = path.join(target:autogendir(), "rules", "qt", "ui")
- target:add("includedirs", path.absolute(headerfile_dir, os.projectdir()))
+ target:add("sysincludedirs", path.absolute(headerfile_dir, os.projectdir()))
-- save uic
target:data_set("qt.uic", uic)