summaryrefslogtreecommitdiff
path: root/xmake/plugins/project/vstudio
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-07-18 19:50:02 +0800
committerOpportunityLiu <[email protected]>2019-07-19 11:48:33 +0800
commite765aa75b91f847e93893271abe1cf265126da54 (patch)
treeb30511a741672d712d43fb419499fcf30e80de37 /xmake/plugins/project/vstudio
parenta8cc8e8989fd52574088200c5d6bbc3a4582d911 (diff)
cleanup code
Diffstat (limited to 'xmake/plugins/project/vstudio')
-rw-r--r--xmake/plugins/project/vstudio/vs.lua17
-rw-r--r--xmake/plugins/project/vstudio/vsx.lua35
2 files changed, 14 insertions, 38 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
diff --git a/xmake/plugins/project/vstudio/vsx.lua b/xmake/plugins/project/vstudio/vsx.lua
deleted file mode 100644
index ff8b83281..000000000
--- a/xmake/plugins/project/vstudio/vsx.lua
+++ /dev/null
@@ -1,35 +0,0 @@
---!A cross-platform build utility based on Lua
---
--- Licensed under the Apache License, Version 2.0 (the "License");
--- you may not use this file except in compliance with the License.
--- You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
--- Copyright (C) 2015 - 2019, TBOOX Open Source Group.
---
--- @author ruki
--- @file vsx.lua
---
-
--- imports
-import("impl.vs201x")
-import("impl.vsinfo")
-
--- make factory
-function make(version)
-
- -- get vs version info
- local info = vsinfo(version)
-
- -- make
- return function(outputdir)
- vs201x.make(outputdir, info)
- end
-end