summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkellygod <[email protected]>2024-05-13 15:14:16 +0800
committerkellygod <[email protected]>2024-05-13 15:16:57 +0800
commit9a26b404d6b77fd11e8b0fb25939fb0e0b62f9b2 (patch)
tree28f34223be2c1e1fd06c1cca4f9ef34849371fce
parent619079e952be45e1f61077cf7fb035ba0ef45e5e (diff)
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#" />