diff options
| author | xq114 <[email protected]> | 2022-02-24 16:51:39 +0800 |
|---|---|---|
| committer | xq114 <[email protected]> | 2022-02-24 16:51:39 +0800 |
| commit | edad33e199e23651ab74674ec63e37e143346771 (patch) | |
| tree | 801e358f526be9f6ddc41ef9d7305226b8db89b5 | |
| parent | 83b50994a3c31b2b65e50a95a00fb7fc5cb22cf7 (diff) | |
fix vsxmake on windows
19 files changed, 21 insertions, 19 deletions
diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua index dfbe7802e..0cd83a2f1 100644 --- a/xmake/plugins/project/vsxmake/getinfo.lua +++ b/xmake/plugins/project/vsxmake/getinfo.lua @@ -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 diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.c(filec) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.c(filec) index 79327d35d..134ee2b62 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.c(filec) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.c(filec) @@ -1,3 +1,3 @@ - <ClCompile Include="$(XmakeProjectDir)\#path#"> + <ClCompile Include="#path#"> <Filter>#dir#</Filter> </ClCompile> diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.cu(filecu) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.cu(filecu) index 189e6d220..9e7ce6858 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.cu(filecu) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.cu(filecu) @@ -1,3 +1,3 @@ - <CudaCompile Include="$(XmakeProjectDir)\#path#"> + <CudaCompile Include="#path#"> <Filter>#dir#</Filter> </CudaCompile> diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.cxx(filecxx) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.cxx(filecxx) index 79327d35d..134ee2b62 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.cxx(filecxx) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.cxx(filecxx) @@ -1,3 +1,3 @@ - <ClCompile Include="$(XmakeProjectDir)\#path#"> + <ClCompile Include="#path#"> <Filter>#dir#</Filter> </ClCompile> diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.mpp(filempp) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.mpp(filempp) index 6588bbf15..9aee25191 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.mpp(filempp) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.mpp(filempp) @@ -1,3 +1,3 @@ - <None Include="$(XmakeProjectDir)\#path#"> + <None Include="#path#"> <Filter>#dir#</Filter> </None> diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.obj(fileobj) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.obj(fileobj) index e62ea9e9e..f0039d2d5 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.obj(fileobj) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.obj(fileobj) @@ -1,3 +1,3 @@ - <Object Include="$(XmakeProjectDir)\#path#"> + <Object Include="#path#"> <Filter>#dir#</Filter> </Object> diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.rc(filerc) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.rc(filerc) index f7bd9969f..c0b9568e6 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.rc(filerc) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.rc(filerc) @@ -1,3 +1,3 @@ - <ResourceCompile Include="$(XmakeProjectDir)\#path#"> + <ResourceCompile Include="#path#"> <Filter>#dir#</Filter> </ResourceCompile> diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.ui(fileui) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.ui(fileui) index 6588bbf15..9aee25191 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.ui(fileui) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.ui(fileui) @@ -1,3 +1,3 @@ - <None Include="$(XmakeProjectDir)\#path#"> + <None Include="#path#"> <Filter>#dir#</Filter> </None> diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/Include.c(incc) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/Include.c(incc) index 8c9e8a547..36908e21f 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/Include.c(incc) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/Include.c(incc) @@ -1,3 +1,3 @@ - <ClInclude Include="$(XmakeProjectDir)\#path#"> + <ClInclude Include="#path#"> <Filter>#dir#</Filter> </ClInclude> diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/Include.natvis(incnatvis) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/Include.natvis(incnatvis) index a00726a8b..f0787a035 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/Include.natvis(incnatvis) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/Include.natvis(incnatvis) @@ -1,3 +1,3 @@ - <Natvis Include="$(XmakeProjectDir)\#path#"> + <Natvis Include="#path#"> <Filter>#dir#</Filter> </Natvis>
\ No newline at end of file diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.c(filec) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.c(filec) index 5a9bc59f3..7bb854de9 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.c(filec) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.c(filec) @@ -1,3 +1,3 @@ - <ClCompile Include="$(XmakeProjectDir)\#path#"> + <ClCompile Include="#path#"> <CompileAs>CompileAsC</CompileAs> </ClCompile> diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.cu(filecu) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.cu(filecu) index ee6f7ffce..72be50b63 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.cu(filecu) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.cu(filecu) @@ -1 +1 @@ - <CudaCompile Include="$(XmakeProjectDir)\#path#" /> + <CudaCompile Include="#path#" /> diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.cxx(filecxx) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.cxx(filecxx) index 92a8b031f..c1bf2e626 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.cxx(filecxx) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.cxx(filecxx) @@ -1,3 +1,3 @@ - <ClCompile Include="$(XmakeProjectDir)\#path#"> + <ClCompile Include="#path#"> <CompileAs>CompileAsCpp</CompileAs> </ClCompile> diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.mpp(filempp) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.mpp(filempp) index 3df4626b5..6429fe3e9 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.mpp(filempp) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.mpp(filempp) @@ -1 +1 @@ - <None Include="$(XmakeProjectDir)\#path#" /> + <None Include="#path#" /> diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.obj(fileobj) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.obj(fileobj) index 2e1c1ed1d..7cefaca84 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.obj(fileobj) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.obj(fileobj) @@ -1 +1 @@ - <Object Include="$(XmakeProjectDir)\#path#" /> + <Object Include="#path#" /> diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.rc(filerc) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.rc(filerc) index 34612f2ef..7ffa8591b 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.rc(filerc) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.rc(filerc) @@ -1 +1 @@ - <ResourceCompile Include="$(XmakeProjectDir)\#path#" /> + <ResourceCompile Include="#path#" /> diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.ui(fileui) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.ui(fileui) index 3df4626b5..6429fe3e9 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.ui(fileui) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.ui(fileui) @@ -1 +1 @@ - <None Include="$(XmakeProjectDir)\#path#" /> + <None Include="#path#" /> diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/Include.c(incc) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/Include.c(incc) index ddafd770a..e50fbb7a0 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/Include.c(incc) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/Include.c(incc) @@ -1 +1 @@ - <ClInclude Include="$(XmakeProjectDir)\#path#" /> + <ClInclude Include="#path#" /> diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/Include.natvis(incnatvis) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/Include.natvis(incnatvis) index 5145694e7..533f394ab 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/Include.natvis(incnatvis) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/Include.natvis(incnatvis) @@ -1,3 +1,3 @@ - <Natvis Include="$(XmakeProjectDir)\#path#"> + <Natvis Include="#path#"> <FileType>Document</FileType> </Natvis>
\ No newline at end of file |
