From 2b15a1b5b149e5156e22358f3d29b4de63473376 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 29 Aug 2016 14:27:02 +0800 Subject: [PATCH] fix some flags conflict for vs201x project --- .../project/vstudio/impl/vs201x_vcxproj.lua | 65 ++++++++++--------- 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua index af8646e0c25..afff30133f4 100755 --- a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua @@ -193,8 +193,8 @@ function _make_configurations(vcxprojfile, vsinfo, target, vcxprojdir) -- make OutputDirectory and IntermediateDirectory vcxprojfile:enter("") - vcxprojfile:print("%s", path.relative(path.absolute(config.get("buildir")), vcxprojdir)) - vcxprojfile:print("%$(Configuration)") + vcxprojfile:print("%s\\", path.relative(path.absolute(config.get("buildir")), vcxprojdir)) + vcxprojfile:print("%$(Configuration)\\") if target:get("kind") == "binary" then vcxprojfile:print("true") end @@ -204,36 +204,43 @@ end -- make ItemDefinitionGroup function _make_item_define_group(vcxprojfile, vsinfo, target, vcxprojdir) - -- make ItemDefinitionGroup for linker + -- enter ItemDefinitionGroup + vcxprojfile:enter("") + + -- for linker? if target:get("kind") == "binary" then - vcxprojfile:enter("") - vcxprojfile:enter("") - - -- make AdditionalOptions - vcxprojfile:print("%s %%(AdditionalOptions)", _make_linkflags(target, vcxprojdir)) - - -- generate debug infomation? - local debug = false - for _, symbol in ipairs(target:get("symbols")) do - if symbol == "debug" then - debug = true - break - end + vcxprojfile:enter("") + + -- make AdditionalOptions + vcxprojfile:print("%s %%(AdditionalOptions)", _make_linkflags(target, vcxprojdir)) + + -- generate debug infomation? + local debug = false + for _, symbol in ipairs(target:get("symbols")) do + if symbol == "debug" then + debug = true + break end - vcxprojfile:print("%s", tostring(debug)) - - -- make SubSystem - vcxprojfile:print("Console") - - -- make TargetMachine - vcxprojfile:print("%s", ifelse(config.arch() == "x64", "MachineX64", "MachineX86")) - - vcxprojfile:leave("") - vcxprojfile:leave("") - else - vcxprojfile:enter("") - vcxprojfile:leave("") + end + vcxprojfile:print("%s", tostring(debug)) + + -- make SubSystem + vcxprojfile:print("Console") + + -- make TargetMachine + vcxprojfile:print("%s", ifelse(config.arch() == "x64", "MachineX64", "MachineX86")) + + vcxprojfile:leave("") end + + -- for compiler? + vcxprojfile:enter("") + vcxprojfile:print("Disabled") -- disable optimization default + vcxprojfile:print("") -- disable pdb file default + vcxprojfile:leave("") + + -- leave ItemDefinitionGroup + vcxprojfile:leave("") end -- make file