From dfef68b97a0e1927a484071d7a36df5888a910e0 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 9 Sep 2019 22:37:46 +0800 Subject: improve qt app for mingw --- CHANGELOG.md | 2 ++ xmake/rules/qt/load.lua | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 833b960c9..621c0e6d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Change * [#563](https://github.com/xmake-io/xmake/pull/563): Separate build rules for specific language files from action/build +* [#570](https://github.com/xmake-io/xmake/issues/570): Add `qt.widgetapp` and `qt.quickapp` rules ### Bugs fixed @@ -640,6 +641,7 @@ ### 改进 * [#563](https://github.com/xmake-io/xmake/pull/563): 重构构建逻辑,将特定语言的构建抽离到独立的rules中去 +* [#570](https://github.com/xmake-io/xmake/issues/570): 改进Qt构建,将`qt.application`拆分成`qt.widgetapp`和`qt.quickapp`两个构建规则 ### Bugs修复 diff --git a/xmake/rules/qt/load.lua b/xmake/rules/qt/load.lua index 1246c5c3e..329aaa447 100644 --- a/xmake/rules/qt/load.lua +++ b/xmake/rules/qt/load.lua @@ -232,11 +232,8 @@ function main(target, opt) -- is gui application? if opt.gui then -- add -subsystem:windows for windows platform - if is_plat("windows") then - target:add("defines", "_WINDOWS") + if is_plat("windows", "mingw") then target:add("ldflags", "-subsystem:windows", "-entry:mainCRTStartup", {force = true}) - elseif is_plat("mingw") then - target:add("ldflags", "-Wl,-subsystem:windows", {force = true}) end end -- cgit v1.3.1