From b288bd164c0ca04a71213a8ea789e7a3c6354fcf Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Mon, 15 Jul 2019 11:18:35 +0800 Subject: fix resolve path --- xmake/plugins/project/vsxmake/vsproj/Xmake.props | 17 +++++++++-------- xmake/plugins/project/vsxmake/vsproj/Xmake.targets | 4 ++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/xmake/plugins/project/vsxmake/vsproj/Xmake.props b/xmake/plugins/project/vsxmake/vsproj/Xmake.props index c4677ae71..0198714f3 100644 --- a/xmake/plugins/project/vsxmake/vsproj/Xmake.props +++ b/xmake/plugins/project/vsxmake/vsproj/Xmake.props @@ -49,13 +49,14 @@ $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeRunDir)')) - $([System.IO.Path]::GetFullPath('$(XmakeProjectDir)')) - $([System.IO.Path]::GetFullPath('$(XmakeScriptDir)')) - $([System.IO.Path]::GetFullPath('$(XmakeBuilDir)')) - $([System.IO.Path]::GetFullPath('$(XmakeTargetDir)')) - $([System.IO.Path]::GetFullPath('$(XmakeConfigDir)')) - $([System.IO.Path]::GetFullPath('$(XmakeConfigFileDir)')) - $([System.IO.Path]::GetFullPath('$(XmakeRunDir)')) + $([MSBuild]::NormalizeDirectory('$(XmakeProgramDir)')) + $([MSBuild]::NormalizeDirectory('$(XmakeProjectDir)')) + $([MSBuild]::NormalizeDirectory('$(XmakeScriptDir)')) + $([MSBuild]::NormalizeDirectory('$(XmakeBuilDir)')) + $([MSBuild]::NormalizeDirectory('$(XmakeTargetDir)')) + $([MSBuild]::NormalizeDirectory('$(XmakeConfigDir)')) + $([MSBuild]::NormalizeDirectory('$(XmakeConfigFileDir)')) + $([MSBuild]::NormalizeDirectory('$(XmakeRunDir)')) @@ -135,6 +136,6 @@ $(XmakeIncludeDir);$(IncludePath) $(XmakeLinkDir);$(LibraryPath) $(XmakeTargetDir) - $(XmakeBuilDir)\.vs\$(TargetName)\$(XmakeArch)\$(XmakeMode)\ + $(XmakeBuilDir).vs\$(TargetName)\$(XmakeArch)\$(XmakeMode)\ diff --git a/xmake/plugins/project/vsxmake/vsproj/Xmake.targets b/xmake/plugins/project/vsxmake/vsproj/Xmake.targets index c3ce99b64..65cf4a77b 100644 --- a/xmake/plugins/project/vsxmake/vsproj/Xmake.targets +++ b/xmake/plugins/project/vsxmake/vsproj/Xmake.targets @@ -17,7 +17,7 @@ <_XmakeCommonFlags>$(_XmakeCommonFlags) $(_XmakeProjectFlag) <_XmakeConfigFlags>$(XmakeConfigFlags.Trim()) - <_XmakeConfigFlags>$(_XmakeConfigFlags) -p $(XmakePlat) -m $(XmakeMode) -a $(XmakeArch) -o "$([MSBuild]::MakeRelative('$(XmakeProjectDir)', '$(XmakeBuilDir)'))" + <_XmakeConfigFlags>$(_XmakeConfigFlags) -p $(XmakePlat) -m $(XmakeMode) -a $(XmakeArch) -o "$([MSBuild]::MakeRelative('$(XmakeProjectDir)', '$(XmakeBuilDir)').TrimEnd('/\'.ToCharArray()))" <_XmakeBuildFlags>$(XmakeBuildFlags.Trim()) <_XmakeBuildFlags Condition="$(XmakeWarning)">$(_XmakeBuildFlags) -w @@ -29,7 +29,7 @@ <_XmakeConfigFlags>$(_XmakeConfigFlags.Trim()) <_XmakeCommonFlags>$(_XmakeCommonFlags.Trim()) - <_XmakeExecutable>"$([System.IO.Path]::GetFullPath('$(XmakeProgramDir)\xmake.exe'))" + <_XmakeExecutable>"$([System.IO.Path]::GetFullPath('$(XmakeProgramDir)xmake.exe'))" <_XmakeEnv> pushd "$(XmakeProjectDir)" set XMAKE_CONFIGDIR=$(XmakeConfigDir) -- cgit v1.3.1