summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruanc <[email protected]>2026-01-11 21:49:08 +0800
committerruanc <[email protected]>2026-01-11 21:49:08 +0800
commit303d4349268ea98f4ec331570fa43987f8001800 (patch)
tree1055241ed667c1975a6b96b1c71019985d055076
parent9ba7ce6c2221beaeac76b66959cd990918934ff0 (diff)
refactor(qt): simplify mkspec includedirs logic
Replace conditional statement with ternary operator for adding includedirs from qt.mkspecsdir. The logic remains the same but the code is more concise using 'qt.mkspec or fallbackmkspec' instead of explicit if-else condition.
-rw-r--r--xmake/rules/qt/load.lua6
1 files changed, 1 insertions, 5 deletions
diff --git a/xmake/rules/qt/load.lua b/xmake/rules/qt/load.lua
index 252e6db5b..1ce0f4fb1 100644
--- a/xmake/rules/qt/load.lua
+++ b/xmake/rules/qt/load.lua
@@ -516,11 +516,7 @@ function main(target, opt)
target:add("shflags", "-s EXPORTED_RUNTIME_METHODS=[\"UTF16ToString\",\"stringToUTF16\"]")
end
end
- if qt.mkspec then
- _add_includedirs(target, path.join(qt.mkspecsdir, qt.mkspec))
- else
- _add_includedirs(target, path.join(qt.mkspecsdir, fallbackmkspec))
- end
+ _add_includedirs(target, path.join(qt.mkspecsdir, qt.mkspec or fallbackmkspec))
-- is gui application?
if opt.gui then