summaryrefslogtreecommitdiff
path: root/xmake/core/package/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-03-07 22:53:18 +0800
committerruki <[email protected]>2023-03-07 22:53:18 +0800
commit6fd71700ffb08da576eb33b38e86a19162bf5f7e (patch)
tree31eaafbe7de63518db5a7cb83331e86853f8163b /xmake/core/package/package.lua
parentb169f8987311921524cb51312d26e8c18c5d9b99 (diff)
improve export embed binary package
Diffstat (limited to 'xmake/core/package/package.lua')
-rw-r--r--xmake/core/package/package.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index f8a59bfc1..a7171c1d1 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -586,16 +586,21 @@ function _instance:is_parallelize()
return self:get("parallelize") ~= false
end
--- is local embed package?
+-- is local embed source code package?
-- we install directly from the local source code instead of downloading it remotely
-function _instance:is_embed()
+function _instance:is_source_embed()
return self:get("sourcedir") and #self:urls() == 0 and self:script("install")
end
+-- is local embed binary package? it's come from `xmake package`
+function _instance:is_binary_embed()
+ return self:get("installdir") and #self:urls() == 0 and not self:script("install") and self:script("fetch")
+end
+
-- is local package?
-- we will use local installdir and cachedir in current project
function _instance:is_local()
- return self:is_embed() or self:is_thirdparty()
+ return self:is_source_embed() or self:is_binary_embed() or self:is_thirdparty()
end
-- use external includes?