summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-03-14 23:30:53 +0800
committerruki <[email protected]>2024-03-14 23:30:53 +0800
commita67fb637ece57b7c0e753de721a32d14551bfc55 (patch)
tree7280e0b96cdf4b7cc93003f3c62f5c7fa8dd1070
parentff083f97e3e1b99faa6ab78e157e9e36c25ab20e (diff)
use extraconf
-rw-r--r--xmake/core/project/target.lua12
1 files changed, 4 insertions, 8 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index 7d2c7d82f..62ee16f61 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -182,7 +182,7 @@ function _instance:_copiedfiles(filetype, outputdir, pathfilter)
if not copiedfiles then return end
-- get the extra information
- local extrainfo = table.wrap(self:get("__extra_" .. filetype))
+ local extrainfo = table.wrap(self:extraconf(filetype))
-- get the source paths and destinate paths
local srcfiles = {}
@@ -1403,7 +1403,7 @@ end
-- get the config info of the given package
function _instance:pkgconfig(pkgname)
- local extra_packages = self:get("__extra_packages")
+ local extra_packages = self:extraconf("packages")
if extra_packages then
return extra_packages[pkgname]
end
@@ -1773,12 +1773,10 @@ end
-- get the config info of the given source file
function _instance:fileconfig(sourcefile)
-
- -- get files config
local filesconfig = self._FILESCONFIG
if not filesconfig then
filesconfig = {}
- for filepath, fileconfig in pairs(table.wrap(self:get("__extra_files"))) do
+ for filepath, fileconfig in pairs(table.wrap(self:extraconf("files"))) do
-- match source files
local results = os.match(filepath)
@@ -1801,8 +1799,6 @@ function _instance:fileconfig(sourcefile)
end
self._FILESCONFIG = filesconfig
end
-
- -- get file config
return filesconfig[sourcefile]
end
@@ -2055,7 +2051,7 @@ function _instance:headerfiles(outputdir, opt)
end
-- get the extra information
- local extrainfo = table.wrap(self:get("__extra_headerfiles"))
+ local extrainfo = table.wrap(self:extraconf("headerfiles"))
-- get the source paths and destinate paths
local srcheaders = {}