summaryrefslogtreecommitdiff
path: root/xmake/core/package/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-06-22 22:57:24 +0800
committerruki <[email protected]>2020-06-22 11:44:26 +0800
commitf78cbc917b997ffaee1f4663472064d5d9515760 (patch)
tree78ba8f204ed0992292c171ee385b3f39fa1c662e /xmake/core/package/package.lua
parente890b1203d110f8b66cb61da6699bdc19e1b5651 (diff)
add kind config for package
Diffstat (limited to 'xmake/core/package/package.lua')
-rw-r--r--xmake/core/package/package.lua11
1 files changed, 9 insertions, 2 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index d47f0fc4e..5dabc8f0b 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -244,9 +244,16 @@ function _instance:revision(url_alias)
return self:sourcehash(url_alias)
end
--- get the package kind, binary or nil(static, shared)
+-- get the package kind, binary or nil(library)
function _instance:kind()
- return self:get("kind")
+ local kind = self:get("kind")
+ if not kind then
+ local requireinfo = self:requireinfo()
+ if requireinfo then
+ kind = requireinfo.kind
+ end
+ end
+ return kind
end
-- get the filelock of the whole package directory