summaryrefslogtreecommitdiff
path: root/xmake/rules/plugin
diff options
context:
space:
mode:
authorruki <[email protected]>2021-12-08 09:42:00 +0800
committerGitHub <[email protected]>2021-12-08 09:42:00 +0800
commit1c25801d85b1e90e24aa2661c7c8574aa729e4d7 (patch)
tree69cd36f92f06de58b07fbc5bf13a1aa96f67bd63 /xmake/rules/plugin
parent0944d5ac92facee9d6b41bf0f7d8b049a31eb01f (diff)
Update xmake.lua
Diffstat (limited to 'xmake/rules/plugin')
-rw-r--r--xmake/rules/plugin/vsxmake/xmake.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/rules/plugin/vsxmake/xmake.lua b/xmake/rules/plugin/vsxmake/xmake.lua
index 88693599f..557d8ed4b 100644
--- a/xmake/rules/plugin/vsxmake/xmake.lua
+++ b/xmake/rules/plugin/vsxmake/xmake.lua
@@ -21,7 +21,7 @@
-- update vsxmake project automatically
--
-- @code
--- add_rules("plugin.vsxmake.autoupdate")
+-- add_rules("plugin.vsxmake.autoupdate", {outputdir = "xxx"})
-- target("test")
-- set_kind("binary")
-- add_files("src/*.c")
@@ -41,6 +41,7 @@ rule("plugin.vsxmake.autoupdate")
local tmpfile = path.join(config.buildir(), ".gens", "rules", "plugin.vsxmake.autoupdate")
local dependfile = tmpfile .. ".d"
local lockfile = io.openlock(tmpfile .. ".lock")
+ local outputdir = project.extraconf("target.rules", "plugin.vsxmake.autoupdate", "outputdir")
if lockfile:trylock() then
if os.getenv("XMAKE_IN_VSTUDIO") then
local sourcefiles = {}
@@ -51,7 +52,7 @@ rule("plugin.vsxmake.autoupdate")
depend.on_changed(function ()
-- we use task instead of os.exec("xmake") to avoid the project lock
print("update vsxmake project ..")
- task.run("project", {kind = "vsxmake"})
+ task.run("project", {kind = "vsxmake", outputdir = outputdir})
print("update vsxmake project ok")
end, {dependfile = dependfile,
files = project.allfiles(),