diff options
| author | OpportunityLiu <[email protected]> | 2019-07-15 11:18:35 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-07-15 11:18:35 +0800 |
| commit | b288bd164c0ca04a71213a8ea789e7a3c6354fcf (patch) | |
| tree | 7cd6968f518d04a64cd5a77948fe54e9532a14ec | |
| parent | 91b6dd5c47463d3e38514e63d71e305bda4501a5 (diff) | |
fix resolve path
| -rw-r--r-- | xmake/plugins/project/vsxmake/vsproj/Xmake.props | 17 | ||||
| -rw-r--r-- | 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 @@ <XmakeRunDir Condition="!$([System.IO.Path]::IsPathRooted('$(XmakeRunDir)'))">$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeRunDir)'))</XmakeRunDir> <!-- normalize paths --> - <XmakeProjectDir>$([System.IO.Path]::GetFullPath('$(XmakeProjectDir)'))</XmakeProjectDir> - <XmakeScriptDir>$([System.IO.Path]::GetFullPath('$(XmakeScriptDir)'))</XmakeScriptDir> - <XmakeBuilDir>$([System.IO.Path]::GetFullPath('$(XmakeBuilDir)'))</XmakeBuilDir> - <XmakeTargetDir>$([System.IO.Path]::GetFullPath('$(XmakeTargetDir)'))</XmakeTargetDir> - <XmakeConfigDir>$([System.IO.Path]::GetFullPath('$(XmakeConfigDir)'))</XmakeConfigDir> - <XmakeConfigFileDir>$([System.IO.Path]::GetFullPath('$(XmakeConfigFileDir)'))</XmakeConfigFileDir> - <XmakeRunDir>$([System.IO.Path]::GetFullPath('$(XmakeRunDir)'))</XmakeRunDir> + <XmakeProgramDir>$([MSBuild]::NormalizeDirectory('$(XmakeProgramDir)'))</XmakeProgramDir> + <XmakeProjectDir>$([MSBuild]::NormalizeDirectory('$(XmakeProjectDir)'))</XmakeProjectDir> + <XmakeScriptDir>$([MSBuild]::NormalizeDirectory('$(XmakeScriptDir)'))</XmakeScriptDir> + <XmakeBuilDir>$([MSBuild]::NormalizeDirectory('$(XmakeBuilDir)'))</XmakeBuilDir> + <XmakeTargetDir>$([MSBuild]::NormalizeDirectory('$(XmakeTargetDir)'))</XmakeTargetDir> + <XmakeConfigDir>$([MSBuild]::NormalizeDirectory('$(XmakeConfigDir)'))</XmakeConfigDir> + <XmakeConfigFileDir>$([MSBuild]::NormalizeDirectory('$(XmakeConfigFileDir)'))</XmakeConfigFileDir> + <XmakeRunDir>$([MSBuild]::NormalizeDirectory('$(XmakeRunDir)'))</XmakeRunDir> </PropertyGroup> <PropertyGroup Label="XmakeFlagsFallback"> @@ -135,6 +136,6 @@ <IncludePath>$(XmakeIncludeDir);$(IncludePath)</IncludePath> <LibraryPath>$(XmakeLinkDir);$(LibraryPath)</LibraryPath> <OutDir>$(XmakeTargetDir)</OutDir> - <IntDir>$(XmakeBuilDir)\.vs\$(TargetName)\$(XmakeArch)\$(XmakeMode)\</IntDir> + <IntDir>$(XmakeBuilDir).vs\$(TargetName)\$(XmakeArch)\$(XmakeMode)\</IntDir> </PropertyGroup> </Project> 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)</_XmakeCommonFlags> <_XmakeConfigFlags>$(XmakeConfigFlags.Trim())</_XmakeConfigFlags> - <_XmakeConfigFlags>$(_XmakeConfigFlags) -p $(XmakePlat) -m $(XmakeMode) -a $(XmakeArch) -o "$([MSBuild]::MakeRelative('$(XmakeProjectDir)', '$(XmakeBuilDir)'))"</_XmakeConfigFlags> + <_XmakeConfigFlags>$(_XmakeConfigFlags) -p $(XmakePlat) -m $(XmakeMode) -a $(XmakeArch) -o "$([MSBuild]::MakeRelative('$(XmakeProjectDir)', '$(XmakeBuilDir)').TrimEnd('/\'.ToCharArray()))"</_XmakeConfigFlags> <_XmakeBuildFlags>$(XmakeBuildFlags.Trim())</_XmakeBuildFlags> <_XmakeBuildFlags Condition="$(XmakeWarning)">$(_XmakeBuildFlags) -w</_XmakeBuildFlags> @@ -29,7 +29,7 @@ <_XmakeConfigFlags>$(_XmakeConfigFlags.Trim())</_XmakeConfigFlags> <_XmakeCommonFlags>$(_XmakeCommonFlags.Trim())</_XmakeCommonFlags> - <_XmakeExecutable>"$([System.IO.Path]::GetFullPath('$(XmakeProgramDir)\xmake.exe'))"</_XmakeExecutable> + <_XmakeExecutable>"$([System.IO.Path]::GetFullPath('$(XmakeProgramDir)xmake.exe'))"</_XmakeExecutable> <_XmakeEnv> pushd "$(XmakeProjectDir)" set XMAKE_CONFIGDIR=$(XmakeConfigDir) |
