From ea8e483128160d943685f0487fb82d586356ddb3 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 27 Dec 2020 23:38:30 +0800 Subject: fix pcheader conflict for vs project --- xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua index 04a53b052..9f9afc1fd 100644 --- a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua @@ -735,10 +735,14 @@ function _make_source_files(vcxprojfile, vsinfo, target, vcxprojdir) vcxprojfile:leave("") - -- add headers + -- add header files + local pcheader = target.pcxxheader or target.pcheader vcxprojfile:enter("") for _, includefile in ipairs(target.headerfiles) do - _make_header_file(vcxprojfile, includefile, vcxprojdir) + -- we need ignore pcheader file to fix https://github.com/xmake-io/xmake/issues/1171 + if not pcheader or includefile ~= pcheader then + _make_header_file(vcxprojfile, includefile, vcxprojdir) + end end vcxprojfile:leave("") end -- cgit v1.3.1