From 9a26b404d6b77fd11e8b0fb25939fb0e0b62f9b2 Mon Sep 17 00:00:00 2001 From: kellygod Date: Mon, 13 May 2024 15:14:16 +0800 Subject: fix vs project not found *.qrc(QT) files --- xmake/plugins/project/vsxmake/vsxmake.lua | 3 +++ .../vsxmake/vsproj/templates/vcxproj.filters/#target#.vcxproj.filters | 1 + .../scripts/vsxmake/vsproj/templates/vcxproj.filters/File.qrc(fileqrc) | 3 +++ xmake/scripts/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj | 1 + xmake/scripts/vsxmake/vsproj/templates/vcxproj/File.qrc(fileqrc) | 1 + 5 files changed, 9 insertions(+) create mode 100644 xmake/scripts/vsxmake/vsproj/templates/vcxproj.filters/File.qrc(fileqrc) create mode 100644 xmake/scripts/vsxmake/vsproj/templates/vcxproj/File.qrc(fileqrc) 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 @@ #Import(File.rc)# #Import(File.ui)# +#Import(File.qrc)# 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 @@ + + #dir# + 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 @@ #Import(File.rc)# #Import(File.ui)# +#Import(File.qrc)#