diff options
| author | OpportunityLiu <[email protected]> | 2019-07-18 19:50:02 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-07-19 11:48:33 +0800 |
| commit | e765aa75b91f847e93893271abe1cf265126da54 (patch) | |
| tree | b30511a741672d712d43fb419499fcf30e80de37 /xmake/plugins/project/vstudio/vs.lua | |
| parent | a8cc8e8989fd52574088200c5d6bbc3a4582d911 (diff) | |
cleanup code
Diffstat (limited to 'xmake/plugins/project/vstudio/vs.lua')
| -rw-r--r-- | xmake/plugins/project/vstudio/vs.lua | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/xmake/plugins/project/vstudio/vs.lua b/xmake/plugins/project/vstudio/vs.lua index a50180a23..e108ef22f 100644 --- a/xmake/plugins/project/vstudio/vs.lua +++ b/xmake/plugins/project/vstudio/vs.lua @@ -20,16 +20,27 @@ -- imports import("impl.vs200x") +import("impl.vs201x") import("impl.vsinfo") -- make factory function make(version) + if not version then + version = assert(tonumber(config.get("vs")), "invalid vs version, run `xmake f --vs=2015`") + vprint("using project kind vs%d", version) + end + -- get vs version info local info = vsinfo(version) - -- make - return function(outputdir) - vs200x.make(outputdir, info) + if vsver < 2010 then + return function(outputdir) + vs200x.make(outputdir, info) + end + else + return function(outputdir) + vs201x.make(outputdir, info) + end end end |
