From bda937a7a86502cdac84dc68b81fde62d6897722 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 7 Jan 2021 00:54:34 +0800 Subject: improve qt.ui rule --- xmake/rules/qt/ui/xmake.lua | 8 ++++++-- 1 file 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) -- cgit v1.3.1