diff options
| author | ruki <[email protected]> | 2019-01-25 22:39:34 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-01-25 09:57:25 +0800 |
| commit | cf136bafccf861a8257ace35a2ccbd8b75006bf7 (patch) | |
| tree | de541393ada0b13c72a6600a673b0b82d3420715 /xmake/actions/require | |
| parent | e7627900b6acfeaefd69e65927178ee16ca0374e (diff) | |
pass config to conan package
Diffstat (limited to 'xmake/actions/require')
| -rw-r--r-- | xmake/actions/require/impl/action/install.lua | 49 | ||||
| -rw-r--r-- | xmake/actions/require/impl/package.lua | 1 |
2 files changed, 29 insertions, 21 deletions
diff --git a/xmake/actions/require/impl/action/install.lua b/xmake/actions/require/impl/action/install.lua index ab51946af..07fd34e02 100644 --- a/xmake/actions/require/impl/action/install.lua +++ b/xmake/actions/require/impl/action/install.lua @@ -79,33 +79,42 @@ function main(package) -- create the install task local installtask = function () - -- uninstall it from the prefix directory first - prefix.uninstall(package) + -- install the third-party package directly, e.g. brew::pcre2/libpcre2-8, conan::OpenSSL/1.0.2n@conan/stable + if package:is3rd() then + local script = package:script("install") + if script ~= nil then + filter.call(script, package) + end + else + + -- uninstall it from the prefix directory first + prefix.uninstall(package) - -- build and install package to the install directory - local installedfile = path.join(package:installdir(), "installed.txt") - if not os.isfile(installedfile) then + -- build and install package to the install directory + local installedfile = path.join(package:installdir(), "installed.txt") + if not os.isfile(installedfile) then - -- clean install directory first - os.tryrm(package:installdir()) + -- clean install directory first + os.tryrm(package:installdir()) - -- do install - for i = 1, 3 do - local script = scripts[i] - if script ~= nil then - filter.call(script, package) + -- do install + for i = 1, 3 do + local script = scripts[i] + if script ~= nil then + filter.call(script, package) + end end - end - -- mark as installed - io.writefile(installedfile, "") - end + -- mark as installed + io.writefile(installedfile, "") + end - -- install to the prefix directory - prefix.install(package) + -- install to the prefix directory + prefix.install(package) - -- test it - test(package) + -- test it + test(package) + end end -- install package diff --git a/xmake/actions/require/impl/package.lua b/xmake/actions/require/impl/package.lua index e4057ac85..607c1a9ae 100644 --- a/xmake/actions/require/impl/package.lua +++ b/xmake/actions/require/impl/package.lua @@ -123,7 +123,6 @@ function _parse_require(require_str, requires_extra, parentinfo) originstr = require_str, reponame = reponame, version = version, - extra = require_extra alias = require_extra.alias, -- set package alias name debug = require_extra.debug, -- uses the debug package, default: false group = require_extra.group, -- only uses the first package in same group |
