summaryrefslogtreecommitdiff
path: root/xmake
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-08-23 16:40:18 +0800
committerOpportunityLiu <[email protected]>2019-08-23 16:40:18 +0800
commitdbfd0769b9d840da2b3ec38bcc80bb3aa977fc31 (patch)
tree7a58aa69a76f57fc2ccd7362b40e13900339ce4d /xmake
parent64b44bca46aa238b9135053bec990fe4f6f74855 (diff)
fix escape; remove duplicate resolve
Diffstat (limited to 'xmake')
-rw-r--r--xmake/plugins/project/vsxmake/getinfo.lua2
-rw-r--r--xmake/plugins/project/vsxmake/vsproj/Xmake.targets13
-rw-r--r--xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj12
3 files changed, 13 insertions, 14 deletions
diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua
index 8cfe46591..149df6721 100644
--- a/xmake/plugins/project/vsxmake/getinfo.lua
+++ b/xmake/plugins/project/vsxmake/getinfo.lua
@@ -267,7 +267,7 @@ function main(outputdir, vsinfo)
-- init solution directory
vsinfo.solution_dir = path.absolute(path.join(outputdir, "vsxmake" .. vsinfo.vstudio_version))
- vsinfo.programdir = xmake.programdir()
+ vsinfo.programdir = _make_dirs(xmake.programdir())
vsinfo.projectdir = project.directory()
vsinfo.sln_projectfile = path.relative(project.file(), vsinfo.solution_dir)
local projectfile = path.filename(project.file())
diff --git a/xmake/plugins/project/vsxmake/vsproj/Xmake.targets b/xmake/plugins/project/vsxmake/vsproj/Xmake.targets
index 811a00b1d..62639139d 100644
--- a/xmake/plugins/project/vsxmake/vsproj/Xmake.targets
+++ b/xmake/plugins/project/vsxmake/vsproj/Xmake.targets
@@ -8,9 +8,6 @@
</ImportGroup>
<PropertyGroup Label="XmakePathsResolve">
- <XmakeProgramDirResolved>$(XmakeProgramDir)</XmakeProgramDirResolved>
- <XmakeProjectDirResolved>$(XmakeProjectDir)</XmakeProjectDirResolved>
- <XmakeScriptDirResolved>$(XmakeScriptDir)</XmakeScriptDirResolved>
<XmakeBuilDirResolved>$(XmakeBuilDir)</XmakeBuilDirResolved>
<XmakeTargetDirResolved>$(XmakeTargetDir)</XmakeTargetDirResolved>
<XmakeConfigDirResolved>$(XmakeConfigDir)</XmakeConfigDirResolved>
@@ -18,8 +15,6 @@
<XmakeRunDirResolved>$(XmakeRunDir)</XmakeRunDirResolved>
<!-- resolve if they are relative paths -->
- <XmakeProjectDirResolved Condition="!$([System.IO.Path]::IsPathRooted('$(XmakeProjectDirResolved)'))">$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeProjectDirResolved)'))</XmakeProjectDirResolved>
- <XmakeScriptDirResolved Condition="!$([System.IO.Path]::IsPathRooted('$(XmakeScriptDirResolved)'))">$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeScriptDirResolved)'))</XmakeScriptDirResolved>
<XmakeBuilDirResolved Condition="!$([System.IO.Path]::IsPathRooted('$(XmakeBuilDirResolved)'))">$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeBuilDirResolved)'))</XmakeBuilDirResolved>
<XmakeTargetDirResolved Condition="!$([System.IO.Path]::IsPathRooted('$(XmakeTargetDirResolved)'))">$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeTargetDirResolved)'))</XmakeTargetDirResolved>
<XmakeConfigDirResolved Condition="!$([System.IO.Path]::IsPathRooted('$(XmakeConfigDirResolved)'))">$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeConfigDirResolved)'))</XmakeConfigDirResolved>
@@ -27,14 +22,16 @@
<XmakeRunDirResolved Condition="!$([System.IO.Path]::IsPathRooted('$(XmakeRunDirResolved)'))">$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(XmakeRunDirResolved)'))</XmakeRunDirResolved>
<!-- normalize paths -->
- <XmakeProgramDirResolved>$([System.IO.Path]::GetFullPath('$(XmakeProgramDirResolved)/'))</XmakeProgramDirResolved>
- <XmakeProjectDirResolved>$([System.IO.Path]::GetFullPath('$(XmakeProjectDirResolved)/'))</XmakeProjectDirResolved>
- <XmakeScriptDirResolved>$([System.IO.Path]::GetFullPath('$(XmakeScriptDirResolved)/'))</XmakeScriptDirResolved>
<XmakeBuilDirResolved>$([System.IO.Path]::GetFullPath('$(XmakeBuilDirResolved)/'))</XmakeBuilDirResolved>
<XmakeTargetDirResolved>$([System.IO.Path]::GetFullPath('$(XmakeTargetDirResolved)/'))</XmakeTargetDirResolved>
<XmakeConfigDirResolved>$([System.IO.Path]::GetFullPath('$(XmakeConfigDirResolved)/'))</XmakeConfigDirResolved>
<XmakeConfigFileDirResolved>$([System.IO.Path]::GetFullPath('$(XmakeConfigFileDirResolved)/'))</XmakeConfigFileDirResolved>
<XmakeRunDirResolved>$([System.IO.Path]::GetFullPath('$(XmakeRunDirResolved)/'))</XmakeRunDirResolved>
+
+ <!-- these paths resolved in Xmake.Default.props, just normalize -->
+ <XmakeProgramDirResolved>$([System.IO.Path]::GetFullPath('$(XmakeProgramDir)/'))</XmakeProgramDirResolved>
+ <XmakeProjectDirResolved>$([System.IO.Path]::GetFullPath('$(XmakeProjectDir)/'))</XmakeProjectDirResolved>
+ <XmakeScriptDirResolved>$([System.IO.Path]::GetFullPath('$(XmakeScriptDir)/'))</XmakeScriptDirResolved>
</PropertyGroup>
<PropertyGroup Label="XmakeInternal">
diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj
index cb47d68db..45fcab98b 100644
--- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj
+++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj
@@ -16,8 +16,6 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{#target_id#}</ProjectGuid>
- <XmakeProgramDir Condition="'$(XmakeProgramDir)' == ''">$(XMAKE_PROGRAM_DIR)</XmakeProgramDir>
- <XmakeProgramDir Condition="'$(XmakeProgramDir)' == ''">#programdir#</XmakeProgramDir>
<Configuration Condition="'$(Configuration)' == ''">release</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
<XmakeScriptDir>#scriptdir#</XmakeScriptDir>
@@ -25,10 +23,14 @@
<XmakeProjectFile>#projectfile#</XmakeProjectFile>
<XmakeTarget>#target#</XmakeTarget>
</PropertyGroup>
- <Import Project="$(XmakeProgramDir)\plugins\project\vsxmake\vsproj\xmake.Defaults.props" />
+ <PropertyGroup Label="XmakeProgram">
+ <XmakeProgramDir Condition="'$(XmakeProgramDir)' == ''">$(XMAKE_PROGRAM_DIR)</XmakeProgramDir>
+ <XmakeProgramDir Condition="'$(XmakeProgramDir)' == ''">#programdir#</XmakeProgramDir>
+ </PropertyGroup>
+ <Import Project="$(XmakeProgramDir)\plugins\project\vsxmake\vsproj\Xmake.Defaults.props" />
#Import(XmakeConfig)#
#Import(XmakePath)#
- <Import Project="$(XmakeProgramDir)\plugins\project\vsxmake\vsproj\xmake.props" />
+ <Import Project="$(XmakeProgramDir)\plugins\project\vsxmake\vsproj\Xmake.props" />
<ItemGroup>
#Import(Include)#
</ItemGroup>
@@ -50,5 +52,5 @@
<!-- <ItemGroup>
#Import(ProjectRef)#
</ItemGroup> -->
- <Import Project="$(XmakeProgramDir)\plugins\project\vsxmake\vsproj\xmake.targets" />
+ <Import Project="$(XmakeProgramDir)\plugins\project\vsxmake\vsproj\Xmake.targets" />
</Project>