summaryrefslogtreecommitdiff
path: root/xmake/rules/platform/windows/idl/xmake.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/rules/platform/windows/idl/xmake.lua')
-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 75c47f7e9..8cffe18df 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)