summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-05-13 17:28:33 +0800
committerGitHub <[email protected]>2024-05-13 17:28:33 +0800
commitb6a7910cd38819db8546ec5ad2bd8e85ab38afd5 (patch)
tree2db7f57f597f82334ff2f68eaa9e6ba9c6f6b2b0
parent7d47693e479472ed072f927d9fb05a4c6885e2f5 (diff)
parent9a26b404d6b77fd11e8b0fb25939fb0e0b62f9b2 (diff)
Merge pull request #5096 from KellyGodLv/dev
fix vs project not found *.qrc(QT) files
-rw-r--r--xmake/plugins/project/vsxmake/vsxmake.lua3
-rw-r--r--xmake/scripts/vsxmake/vsproj/templates/vcxproj.filters/#target#.vcxproj.filters1
-rw-r--r--xmake/scripts/vsxmake/vsproj/templates/vcxproj.filters/File.qrc(fileqrc)3
-rw-r--r--xmake/scripts/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj1
-rw-r--r--xmake/scripts/vsxmake/vsproj/templates/vcxproj/File.qrc(fileqrc)1
5 files changed, 9 insertions, 0 deletions
diff --git a/xmake/plugins/project/vsxmake/vsxmake.lua b/xmake/plugins/project/vsxmake/vsxmake.lua
index 37c19af45..bae206cee 100644
--- a/xmake/plugins/project/vsxmake/vsxmake.lua
+++ b/xmake/plugins/project/vsxmake/vsxmake.lua
@@ -139,6 +139,9 @@ function _buildparams(info, target, default)
elseif args.fileui then -- for qt/.ui
local files = info._targets[target].sourcefiles
table.insert(r, _filter_files(files, {".ui"}))
+ elseif args.fileqrc then -- for qt/.qrc
+ local files = info._targets[target].sourcefiles
+ table.insert(r, _filter_files(files, {".qrc"}))
elseif args.incc then
local files = table.join(info._targets[target].headerfiles or {}, info._targets[target].extrafiles)
table.insert(r, _filter_files(files, nil, {".natvis"}))
diff --git a/xmake/scripts/vsxmake/vsproj/templates/vcxproj.filters/#target#.vcxproj.filters b/xmake/scripts/vsxmake/vsproj/templates/vcxproj.filters/#target#.vcxproj.filters
index eee3d1a12..217e32ed5 100644
--- a/xmake/scripts/vsxmake/vsproj/templates/vcxproj.filters/#target#.vcxproj.filters
+++ b/xmake/scripts/vsxmake/vsproj/templates/vcxproj.filters/#target#.vcxproj.filters
@@ -47,6 +47,7 @@
<ItemGroup>
#Import(File.rc)#
#Import(File.ui)#
+#Import(File.qrc)#
</ItemGroup>
<Import Condition="Exists('$(MSBuildThisFileDirectory)\Xmake.Custom.files.filters')"
Project="$(MSBuildThisFileDirectory)\Xmake.Custom.files.filters" />
diff --git a/xmake/scripts/vsxmake/vsproj/templates/vcxproj.filters/File.qrc(fileqrc) b/xmake/scripts/vsxmake/vsproj/templates/vcxproj.filters/File.qrc(fileqrc)
new file mode 100644
index 000000000..9aee25191
--- /dev/null
+++ b/xmake/scripts/vsxmake/vsproj/templates/vcxproj.filters/File.qrc(fileqrc)
@@ -0,0 +1,3 @@
+ <None Include="#path#">
+ <Filter>#dir#</Filter>
+ </None>
diff --git a/xmake/scripts/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj b/xmake/scripts/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj
index b194ce86c..40b594b18 100644
--- a/xmake/scripts/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj
+++ b/xmake/scripts/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj
@@ -47,6 +47,7 @@
<ItemGroup>
#Import(File.rc)#
#Import(File.ui)#
+#Import(File.qrc)#
</ItemGroup>
<!-- <ItemGroup>
#Import(ProjectRef)#
diff --git a/xmake/scripts/vsxmake/vsproj/templates/vcxproj/File.qrc(fileqrc) b/xmake/scripts/vsxmake/vsproj/templates/vcxproj/File.qrc(fileqrc)
new file mode 100644
index 000000000..6429fe3e9
--- /dev/null
+++ b/xmake/scripts/vsxmake/vsproj/templates/vcxproj/File.qrc(fileqrc)
@@ -0,0 +1 @@
+ <None Include="#path#" />