diff options
| author | ruki <[email protected]> | 2020-11-23 23:04:36 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-11-23 23:04:36 +0800 |
| commit | 2daf5d5ca85b51a6be002b2df621dc2c142edd5c (patch) | |
| tree | 93be7eede65b826cef6e29b9807db201e01031af | |
| parent | 5bfd4619b0f54678c765064d892c016edbc2f6e8 (diff) | |
add set_plat/set_arch for package
| -rw-r--r-- | xmake/core/package/package.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index 0a792cfc3..c92000d48 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -102,7 +102,7 @@ function _instance:plat() if requireinfo and requireinfo.plat then return requireinfo.plat end - return config.get("plat") or os.host() + return self:get("plat") or config.get("plat") or os.host() end -- get the architecture of package @@ -115,7 +115,7 @@ function _instance:arch() if requireinfo and requireinfo.arch then return requireinfo.arch end - return config.get("arch") or os.arch() + return self:get("arch") or config.get("arch") or os.arch() end -- get the target os @@ -1293,6 +1293,8 @@ function package.apis() -- package.set_xxx "package.set_urls" , "package.set_kind" + , "package.set_plat" + , "package.set_arch" , "package.set_license" , "package.set_homepage" , "package.set_description" |
