diff options
| author | ruki <[email protected]> | 2017-09-06 10:14:39 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-09-06 10:14:54 +0800 |
| commit | acdcde640f89df691cbaee89b71682e295de030b (patch) | |
| tree | 43c5bcb084e91b424fd3659987758f672a6f12c5 /xmake/core/package/package.lua | |
| parent | fa7b871c4880fd8947e872a8fcef815de36ea358 (diff) | |
add required packages and deps to targets
Diffstat (limited to 'xmake/core/package/package.lua')
| -rw-r--r-- | xmake/core/package/package.lua | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index 267594faa..fc93539dd 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -118,6 +118,16 @@ function _instance:urls_set(urls) self._URLS = urls end +-- get deps +function _instance:deps() + return self._DEPS +end + +-- get order deps +function _instance:orderdeps() + return self._ORDERDEPS +end + -- phony package? function _instance:phony() return #self:urls() == 0 @@ -248,9 +258,11 @@ end function _instance:fetch() -- find package - self._find_package = self._find_package or import("lib.detect.find_package", {anonymous = true}) - self._FETCHINFO = self._FETCHINFO or self._find_package(self:name(), {packagedirs = self:installdir()}) - return self._FETCHINFO + if not self:phony() then + self._find_package = self._find_package or import("lib.detect.find_package", {anonymous = true}) + self._FETCHINFO = self._FETCHINFO or self._find_package(self:name(), {packagedirs = self:installdir()}) + return self._FETCHINFO + end end -- exists this package in local @@ -294,7 +306,7 @@ function package.apis() , "package.set_homepage" , "package.set_description" -- package.add_xxx - , "package.add_requires" + , "package.add_deps" } , script = { |
