diff options
Diffstat (limited to 'xmake/actions/require/impl/action/install.lua')
| -rw-r--r-- | xmake/actions/require/impl/action/install.lua | 49 |
1 files changed, 29 insertions, 20 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 |
