summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-04-09 00:53:02 +0800
committerruki <[email protected]>2025-04-09 00:53:02 +0800
commit9d8707ae3fe665f5f33991f1088d707f334546e5 (patch)
treed78aee2f95fa38380471dd8e59e83e296c6db833
parent7b32b30c9585fafb25f3b024e295ec99a77a2e9b (diff)
fix idl rule
-rw-r--r--xmake/rules/platform/windows/idl/xmake.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/xmake/rules/platform/windows/idl/xmake.lua b/xmake/rules/platform/windows/idl/xmake.lua
index 484bfc150..f3a907f09 100644
--- a/xmake/rules/platform/windows/idl/xmake.lua
+++ b/xmake/rules/platform/windows/idl/xmake.lua
@@ -22,10 +22,13 @@
rule("platform.windows.idl")
set_extensions(".idl")
- on_config(function (target)
- local autogendir = path.join(target:autogendir(), "platform/windows/idl")
- os.mkdir(autogendir)
- target:add("includedirs", autogendir, {public = true})
+ on_config("windows", "mingw", function (target)
+ local sourcebatch = target:sourcebatches()["platform.windows.idl"]
+ if sourcebatch then
+ local autogendir = path.join(target:autogendir(), "platform/windows/idl")
+ os.mkdir(autogendir)
+ target:add("includedirs", autogendir, {public = true})
+ end
end)
before_buildcmd_file(function (target, batchcmds, sourcefile, opt)