diff options
| author | ruki <[email protected]> | 2021-12-08 09:42:00 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-12-08 09:42:00 +0800 |
| commit | 1c25801d85b1e90e24aa2661c7c8574aa729e4d7 (patch) | |
| tree | 69cd36f92f06de58b07fbc5bf13a1aa96f67bd63 /xmake/rules/plugin/vsxmake/xmake.lua | |
| parent | 0944d5ac92facee9d6b41bf0f7d8b049a31eb01f (diff) | |
Update xmake.lua
Diffstat (limited to 'xmake/rules/plugin/vsxmake/xmake.lua')
| -rw-r--r-- | xmake/rules/plugin/vsxmake/xmake.lua | 5 |
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(), |
