Skip to content

Commit

Permalink
Merge pull request #2088 from xq114/dev
Browse files Browse the repository at this point in the history
fix vsxmake on windows
  • Loading branch information
waruqi authored Feb 24, 2022
2 parents 13f33d1 + edad33e commit 31cc678
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 19 deletions.
4 changes: 3 additions & 1 deletion xmake/plugins/project/vsxmake/getinfo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -472,11 +472,13 @@ function main(outputdir, vsinfo)
target.headerfiles = table.imap(target.headerfiles, function(_, v) return path.relative(v, root) end)
for _, f in ipairs(table.join(target.sourcefiles, target.headerfiles)) do
local dir = path.directory(f)
local escaped_f = _escape(f)
-- @see https://github.com/xmake-io/xmake/issues/2039
dir = _strip_dotdirs(dir)
target._paths[f] =
{
path = _escape(f),
-- @see https://github.com/xmake-io/xmake/issues/2077
path = path.is_absolute(escaped_f) and escaped_f or "$(XmakeProjectDir)\\" .. escaped_f,
dir = _escape(dir)
}
while dir ~= "." do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<ClCompile Include="$(XmakeProjectDir)\#path#">
<ClCompile Include="#path#">
<Filter>#dir#</Filter>
</ClCompile>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<CudaCompile Include="$(XmakeProjectDir)\#path#">
<CudaCompile Include="#path#">
<Filter>#dir#</Filter>
</CudaCompile>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<ClCompile Include="$(XmakeProjectDir)\#path#">
<ClCompile Include="#path#">
<Filter>#dir#</Filter>
</ClCompile>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<None Include="$(XmakeProjectDir)\#path#">
<None Include="#path#">
<Filter>#dir#</Filter>
</None>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<Object Include="$(XmakeProjectDir)\#path#">
<Object Include="#path#">
<Filter>#dir#</Filter>
</Object>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<ResourceCompile Include="$(XmakeProjectDir)\#path#">
<ResourceCompile Include="#path#">
<Filter>#dir#</Filter>
</ResourceCompile>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<None Include="$(XmakeProjectDir)\#path#">
<None Include="#path#">
<Filter>#dir#</Filter>
</None>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<ClInclude Include="$(XmakeProjectDir)\#path#">
<ClInclude Include="#path#">
<Filter>#dir#</Filter>
</ClInclude>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<Natvis Include="$(XmakeProjectDir)\#path#">
<Natvis Include="#path#">
<Filter>#dir#</Filter>
</Natvis>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<ClCompile Include="$(XmakeProjectDir)\#path#">
<ClCompile Include="#path#">
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<CudaCompile Include="$(XmakeProjectDir)\#path#" />
<CudaCompile Include="#path#" />
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<ClCompile Include="$(XmakeProjectDir)\#path#">
<ClCompile Include="#path#">
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<None Include="$(XmakeProjectDir)\#path#" />
<None Include="#path#" />
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<Object Include="$(XmakeProjectDir)\#path#" />
<Object Include="#path#" />
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<ResourceCompile Include="$(XmakeProjectDir)\#path#" />
<ResourceCompile Include="#path#" />
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<None Include="$(XmakeProjectDir)\#path#" />
<None Include="#path#" />
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<ClInclude Include="$(XmakeProjectDir)\#path#" />
<ClInclude Include="#path#" />
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<Natvis Include="$(XmakeProjectDir)\#path#">
<Natvis Include="#path#">
<FileType>Document</FileType>
</Natvis>

0 comments on commit 31cc678

Please sign in to comment.