diff options
| author | ruki <[email protected]> | 2021-01-18 23:05:24 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-01-18 23:05:24 +0800 |
| commit | 49f0297ee150cca94803fb6b83dc048c9881b2c5 (patch) | |
| tree | a0cd5c18a826a0e31b99615f180174491444eebf | |
| parent | 7f237e38f2c6e5c751ca563003574145b15c7491 (diff) | |
improve qt.ui
| -rw-r--r-- | xmake/rules/qt/ui/xmake.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xmake/rules/qt/ui/xmake.lua b/xmake/rules/qt/ui/xmake.lua index 82a5095e6..623e68afc 100644 --- a/xmake/rules/qt/ui/xmake.lua +++ b/xmake/rules/qt/ui/xmake.lua @@ -34,13 +34,16 @@ 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, @note we use sysincludedirs to suppress warning (file not found). + -- add includedirs, @note we need create this directory first 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("sysincludedirs", path.absolute(headerfile_dir, os.projectdir())) + if not os.isdir(headerfile_dir) then + os.mkdir(headerfile_dir) + end + target:add("includedirs", path.absolute(headerfile_dir, os.projectdir())) -- save uic target:data_set("qt.uic", uic) |
