summaryrefslogtreecommitdiff
path: root/xmake/core
diff options
context:
space:
mode:
authorruki <[email protected]>2021-09-29 00:51:53 +0800
committerruki <[email protected]>2021-09-29 00:51:53 +0800
commit88eda991bfd54b709cda4eb72be1665ad6ce85ef (patch)
treeddd328d9c0c071c14999194477d632863462a5e3 /xmake/core
parent169141eaa2158281f80aca5c30e17c9d1ace52d7 (diff)
add with cmakelists
Diffstat (limited to 'xmake/core')
-rw-r--r--xmake/core/package/package.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index 4b3432246..a29c4fd1f 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -514,6 +514,11 @@ function _instance:unlock()
end
end
+-- get the source directory
+function _instance:sourcedir()
+ return self:get("sourcedir")
+end
+
-- get the cached directory of this package
function _instance:cachedir()
local name = self:name():lower():gsub("::", "_")
@@ -1715,6 +1720,7 @@ function package.apis()
, "package.set_homepage"
, "package.set_description"
, "package.set_parallelize"
+ , "package.set_sourcedir"
, "package.set_installdir"
-- package.add_xxx
, "package.add_deps"