diff options
| author | ruki <[email protected]> | 2016-08-07 21:47:10 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-08-07 21:47:10 +0800 |
| commit | 92f5c739180afb80ddf99865902a68f122c3aef1 (patch) | |
| tree | 2a7d9b16e8befeddda5d338d554db8ed3dfb3326 | |
| parent | 8aadd86d566ef6e0c9d1e8ed33d46647c71a8edf (diff) | |
create empty vcproj
| -rwxr-xr-x | xmake/plugins/project/vstudio/impl/vs200x.lua | 6 | ||||
| -rwxr-xr-x | xmake/plugins/project/vstudio/impl/vs200x_solution.lua | 1 | ||||
| -rwxr-xr-x | xmake/plugins/project/vstudio/impl/vs200x_vcproj.lua | 38 |
3 files changed, 45 insertions, 0 deletions
diff --git a/xmake/plugins/project/vstudio/impl/vs200x.lua b/xmake/plugins/project/vstudio/impl/vs200x.lua index ebe28baaf..e9f5d9eb8 100755 --- a/xmake/plugins/project/vstudio/impl/vs200x.lua +++ b/xmake/plugins/project/vstudio/impl/vs200x.lua @@ -23,6 +23,7 @@ -- imports import("core.project.project") import("vs200x_solution") +import("vs200x_vcproj") -- make vstudio project function make(outputdir, vsinfo) @@ -33,6 +34,11 @@ function make(outputdir, vsinfo) -- make solution vs200x_solution.make(outputdir, vsinfo) + -- make vsprojs + for _, target in pairs(project.targets()) do + vs200x_vcproj.make(outputdir, vsinfo, target) + end + -- leave project directory os.cd(olddir) end diff --git a/xmake/plugins/project/vstudio/impl/vs200x_solution.lua b/xmake/plugins/project/vstudio/impl/vs200x_solution.lua index c0dccebd1..90f0434da 100755 --- a/xmake/plugins/project/vstudio/impl/vs200x_solution.lua +++ b/xmake/plugins/project/vstudio/impl/vs200x_solution.lua @@ -26,6 +26,7 @@ import("vsfile") -- make header function _make_header(slnfile, vsinfo) + slnfile:print("") slnfile:print("Microsoft Visual Studio Solution File, Format Version %s.00", vsinfo.solution_version) slnfile:print("# Visual Studio %s", vsinfo.vstudio_version) end diff --git a/xmake/plugins/project/vstudio/impl/vs200x_vcproj.lua b/xmake/plugins/project/vstudio/impl/vs200x_vcproj.lua new file mode 100755 index 000000000..fd35145fe --- /dev/null +++ b/xmake/plugins/project/vstudio/impl/vs200x_vcproj.lua @@ -0,0 +1,38 @@ +--!The Make-like Build Utility based on Lua +-- +-- XMake is free software; you can redistribute it and/or modify +-- it under the terms of the GNU Lesser General Public License as published by +-- the Free Software Foundation; either version 2.1 of the License, or +-- (at your option) any later version. +-- +-- XMake is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public License +-- along with XMake; +-- If not, see <a href="http://www.gnu.org/licenses/"> http://www.gnu.org/licenses/</a> +-- +-- Copyright (C) 2015 - 2016, ruki All rights reserved. +-- +-- @author ruki +-- @file vs200x_vcproj.lua +-- + +-- imports +import("vsfile") + +-- make vcproj +function make(outputdir, vsinfo, target) + + -- the target name + local targetname = target:name() + + -- open vcproj file + local vcprojfile = vsfile.open(format("%s/vs%s/%s/%s.vsproj", outputdir, vsinfo.vstudio_version, targetname, targetname), "w") + + + -- exit solution file + vcprojfile:close() +end |
