summaryrefslogtreecommitdiff
path: root/xmake/plugins
diff options
context:
space:
mode:
authorruki <[email protected]>2022-02-27 07:55:00 +0800
committerGitHub <[email protected]>2022-02-27 07:55:00 +0800
commit3508e17ed35d2dab3fbecdcb4ce389eb17cafdee (patch)
treeebe087a5ddee751ded12d0d60b406ea2ae6fd715 /xmake/plugins
parent534e8608d5867ef766cf6b2836ccbe2b72fbdfee (diff)
parente06cf0d188d68225d6b55e6166ef152b57d85f68 (diff)
Merge pull request #2104 from xq114/dev
improve vsxmake filter
Diffstat (limited to 'xmake/plugins')
-rw-r--r--xmake/plugins/project/vsxmake/getinfo.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua
index 2441ab982..446dfc32d 100644
--- a/xmake/plugins/project/vsxmake/getinfo.lua
+++ b/xmake/plugins/project/vsxmake/getinfo.lua
@@ -444,6 +444,7 @@ function main(outputdir, vsinfo)
_target.vcxprojdir = path.join(vsinfo.solution_dir, targetname)
_target.target_id = hash.uuid4(targetname)
_target.kind = target:kind()
+ _target.absscriptdir = target:scriptdir()
_target.scriptdir = path.relative(target:scriptdir(), _target.vcxprojdir)
_target.projectdir = path.relative(project.directory(), _target.vcxprojdir)
local targetdir = target:get("targetdir")
@@ -467,7 +468,7 @@ function main(outputdir, vsinfo)
for _, target in pairs(targets) do
target._paths = {}
local dirs = {}
- local root = target.scriptdir or project.directory()
+ local root = target.absscriptdir or project.directory()
target.sourcefiles = table.imap(target.sourcefiles, function(_, v) return path.relative(v, root) end)
target.headerfiles = table.imap(target.headerfiles, function(_, v) return path.relative(v, root) end)
for _, f in ipairs(table.join(target.sourcefiles, target.headerfiles)) do