summaryrefslogtreecommitdiff
path: root/xmake/core/project
diff options
context:
space:
mode:
authorruki <[email protected]>2021-03-05 22:42:48 +0800
committerruki <[email protected]>2021-03-05 22:42:48 +0800
commit6ad24d9abe5b30d3b3c7dbf812afc558a10ecc08 (patch)
tree81116129f0209732ef4970627ad87c121d1652ec /xmake/core/project
parent1e293d3a5f31afed5e4f78670d66b5b18ccc2608 (diff)
add is_static/is_shared
Diffstat (limited to 'xmake/core/project')
-rw-r--r--xmake/core/project/target.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index 22ffa5cf4..079199b47 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -650,6 +650,16 @@ function _instance:is_binary()
return self:kind() == "binary"
end
+-- is shared library target?
+function _instance:is_shared()
+ return self:kind() == "shared"
+end
+
+-- is static library target?
+function _instance:is_static()
+ return self:kind() == "static"
+end
+
-- is default target?
function _instance:is_default()
local default = self:get("default")