diff options
| -rw-r--r-- | xmake/rules/platform/windows/idl/xmake.lua | 11 |
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) |
