summaryrefslogtreecommitdiff
path: root/xmake/plugins
diff options
context:
space:
mode:
authorruki <[email protected]>2022-02-17 23:39:35 +0800
committerruki <[email protected]>2022-02-17 23:39:35 +0800
commit1ca14da621e39e1a71864fdde0ab8da70e64197c (patch)
tree95bac50791df05d7024bd6e17440c18b62644079 /xmake/plugins
parentbf15cc2a9c3f734463202f7cf14c439c7039396c (diff)
add mpp for vsxmake
Diffstat (limited to 'xmake/plugins')
-rw-r--r--xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/#target#.vcxproj.filters1
-rw-r--r--xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.mpp(filempp)3
-rw-r--r--xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj1
-rw-r--r--xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.mpp(filempp)1
-rw-r--r--xmake/plugins/project/vsxmake/vsxmake.lua3
5 files changed, 9 insertions, 0 deletions
diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/#target#.vcxproj.filters b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/#target#.vcxproj.filters
index 02ae9b11b..eee3d1a12 100644
--- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/#target#.vcxproj.filters
+++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/#target#.vcxproj.filters
@@ -38,6 +38,7 @@
<ItemGroup>
#Import(File.c)#
#Import(File.cxx)#
+#Import(File.mpp)#
#Import(File.cu)#
</ItemGroup>
<ItemGroup>
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)
new file mode 100644
index 000000000..6588bbf15
--- /dev/null
+++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/File.mpp(filempp)
@@ -0,0 +1,3 @@
+ <None Include="$(XmakeProjectDir)\#path#">
+ <Filter>#dir#</Filter>
+ </None>
diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj
index 3574c7d4d..111dd454b 100644
--- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj
+++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj
@@ -38,6 +38,7 @@
<ItemGroup>
#Import(File.c)#
#Import(File.cxx)#
+#Import(File.mpp)#
#Import(File.cu)#
</ItemGroup>
<ItemGroup>
diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.mpp(filempp) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.mpp(filempp)
new file mode 100644
index 000000000..3df4626b5
--- /dev/null
+++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/File.mpp(filempp)
@@ -0,0 +1 @@
+ <None Include="$(XmakeProjectDir)\#path#" />
diff --git a/xmake/plugins/project/vsxmake/vsxmake.lua b/xmake/plugins/project/vsxmake/vsxmake.lua
index 469448764..d152cc383 100644
--- a/xmake/plugins/project/vsxmake/vsxmake.lua
+++ b/xmake/plugins/project/vsxmake/vsxmake.lua
@@ -123,6 +123,9 @@ function _buildparams(info, target, default)
elseif args.filecxx then
local files = info._targets[target].sourcefiles
table.insert(r, _filter_files(files, {".cpp", ".cc", ".cxx"}))
+ elseif args.filempp then
+ local files = info._targets[target].sourcefiles
+ table.insert(r, _filter_files(files, {".mpp", ".mxx", ".cppm", ".ixx"}))
elseif args.filecu then
local files = info._targets[target].sourcefiles
table.insert(r, _filter_files(files, {".cu"}))