Skip to content

Commit a67fb63

Browse files
committed
use extraconf
1 parent ff083f9 commit a67fb63

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

xmake/core/project/target.lua

+4-8
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ function _instance:_copiedfiles(filetype, outputdir, pathfilter)
182182
if not copiedfiles then return end
183183

184184
-- get the extra information
185-
local extrainfo = table.wrap(self:get("__extra_" .. filetype))
185+
local extrainfo = table.wrap(self:extraconf(filetype))
186186

187187
-- get the source paths and destinate paths
188188
local srcfiles = {}
@@ -1403,7 +1403,7 @@ end
14031403

14041404
-- get the config info of the given package
14051405
function _instance:pkgconfig(pkgname)
1406-
local extra_packages = self:get("__extra_packages")
1406+
local extra_packages = self:extraconf("packages")
14071407
if extra_packages then
14081408
return extra_packages[pkgname]
14091409
end
@@ -1773,12 +1773,10 @@ end
17731773

17741774
-- get the config info of the given source file
17751775
function _instance:fileconfig(sourcefile)
1776-
1777-
-- get files config
17781776
local filesconfig = self._FILESCONFIG
17791777
if not filesconfig then
17801778
filesconfig = {}
1781-
for filepath, fileconfig in pairs(table.wrap(self:get("__extra_files"))) do
1779+
for filepath, fileconfig in pairs(table.wrap(self:extraconf("files"))) do
17821780

17831781
-- match source files
17841782
local results = os.match(filepath)
@@ -1801,8 +1799,6 @@ function _instance:fileconfig(sourcefile)
18011799
end
18021800
self._FILESCONFIG = filesconfig
18031801
end
1804-
1805-
-- get file config
18061802
return filesconfig[sourcefile]
18071803
end
18081804

@@ -2055,7 +2051,7 @@ function _instance:headerfiles(outputdir, opt)
20552051
end
20562052

20572053
-- get the extra information
2058-
local extrainfo = table.wrap(self:get("__extra_headerfiles"))
2054+
local extrainfo = table.wrap(self:extraconf("headerfiles"))
20592055

20602056
-- get the source paths and destinate paths
20612057
local srcheaders = {}

0 commit comments

Comments
 (0)