diff options
| author | ruki <[email protected]> | 2023-11-07 23:44:41 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-11-07 23:44:41 +0800 |
| commit | 00500d01dc3457d2531aeda985089f941ed468a1 (patch) | |
| tree | 5be215ac8e9d260389cc11f158d9e27358eef6b2 | |
| parent | a1538c616b01bde50770ace4cefb0be49c8313b4 (diff) | |
enable manifest for shared
| -rw-r--r-- | xmake/rules/platform/windows/manifest/xmake.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/rules/platform/windows/manifest/xmake.lua b/xmake/rules/platform/windows/manifest/xmake.lua index b545b3586..cb9979342 100644 --- a/xmake/rules/platform/windows/manifest/xmake.lua +++ b/xmake/rules/platform/windows/manifest/xmake.lua @@ -23,16 +23,17 @@ rule("platform.windows.manifest") set_extensions(".manifest") on_config("windows", function (target) - if not target:is_binary() then + if not target:is_binary() and not target:is_shared() then return end - if target:has_tool("ld", "link") then + if target:has_tool("ld", "link") or target:has_tool("sh", "link") then local manifest = false local uac = false local sourcebatch = target:sourcebatches()["platform.windows.manifest"] if sourcebatch then for _, sourcefile in ipairs(sourcebatch.sourcefiles) do target:add("ldflags", "/manifestinput:" .. path.translate(sourcefile), {force = true}) + target:add("shflags", "/manifestinput:" .. path.translate(sourcefile), {force = true}) manifest = true local content = io.readfile(sourcefile) if content then @@ -50,7 +51,10 @@ rule("platform.windows.manifest") if uac then target:add("ldflags", "/manifestuac:no", {force = true}) end + target:add("shflags", "/manifestuac:no", {force = true}) + target:add("ldflags", "/manifest:embed", {force = true}) + target:add("shflags", "/manifest:embed", {force = true}) else local level = target:policy("windows.manifest.uac") if level then |
