diff options
| -rw-r--r-- | xmake/rules/winsdk/xmake.lua | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/xmake/rules/winsdk/xmake.lua b/xmake/rules/winsdk/xmake.lua index 60be1ce08..1c049731a 100644 --- a/xmake/rules/winsdk/xmake.lua +++ b/xmake/rules/winsdk/xmake.lua @@ -25,13 +25,10 @@ rule("win.sdk.resource") -- define rule: application rule("win.sdk.application") - - -- before load on_load(function (target) target:set("kind", "binary") end) - -- after load after_load(function (target) -- set subsystem: windows @@ -48,8 +45,8 @@ rule("win.sdk.application") end end end - if not subsystem and target:has_tool("ld", "link") then - target:add("ldflags", "-subsystem:windows", {force = true}) + if not subsystem then + target:add("ldflags", "-subsystem:windows", {force = true, tools == "link"}) end end @@ -57,7 +54,7 @@ rule("win.sdk.application") target:add("syslinks", "kernel32", "user32", "gdi32", "winspool", "comdlg32", "advapi32") target:add("syslinks", "shell32", "ole32", "oleaut32", "uuid", "odbc32", "odbccp32", "comctl32") target:add("syslinks", "comdlg32", "setupapi", "shlwapi") - if not is_plat("mingw") then + if not target:is_plat("mingw") then target:add("syslinks", "strsafe") end end) |
