summaryrefslogtreecommitdiff
path: root/xmake/core/package/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2021-06-12 00:45:55 +0800
committerruki <[email protected]>2021-06-12 00:45:55 +0800
commitad1d98b5598966c0e89871d1d4b11166478bdeea (patch)
treef830332e006f3685cc865edd4fd2d64cecbe616f /xmake/core/package/package.lua
parent54dc077b7176e1f602342292b80c29d4cc39b66c (diff)
add headeronly for package
Diffstat (limited to 'xmake/core/package/package.lua')
-rw-r--r--xmake/core/package/package.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index d68bcff57..3ad23f67f 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -357,6 +357,11 @@ function _instance:is_library()
return self:kind() == nil or self:kind() == "library"
end
+-- is header only?
+function _instance:is_headeronly()
+ return self:is_library() and self:extraconf("kind", "library", "headeronly")
+end
+
-- is top level? user top requires in xmake.lua
function _instance:is_toplevel()
local requireinfo = self:requireinfo()