summaryrefslogtreecommitdiff
path: root/xmake/modules/package/manager/find_package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-11-11 23:56:06 +0800
committerruki <[email protected]>2020-11-11 23:56:06 +0800
commitfc26a75e9566e93c70d9d0bd0340f60d266f5dbd (patch)
tree1d9c0373081bd119837506ebbe386a6c44d44bba /xmake/modules/package/manager/find_package.lua
parent1c0b961dc0c2fd50be0c5d2676d362a5d38b0cf2 (diff)
support to find and install pacman package
Diffstat (limited to 'xmake/modules/package/manager/find_package.lua')
-rw-r--r--xmake/modules/package/manager/find_package.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/modules/package/manager/find_package.lua b/xmake/modules/package/manager/find_package.lua
index 11159ba85..879a9a6e9 100644
--- a/xmake/modules/package/manager/find_package.lua
+++ b/xmake/modules/package/manager/find_package.lua
@@ -22,6 +22,7 @@
import("core.base.semver")
import("core.base.option")
import("core.project.config")
+import("lib.detect.find_tool")
-- find package with the builtin rule
--
@@ -55,6 +56,11 @@ function _find_package_with_builtin_rule(package_name, opt)
-- only support the current sub-host platform and sub-architecture, e.g. linux, macosx, or msys (subsystem)
if opt.plat == os.subhost() and opt.arch == os.subarch() then
+ -- find it from pacman
+ if is_subhost("linux", "msys") and find_tool("pacman") then
+ table.insert(managers, "pacman")
+ end
+
-- find it from pkg-config
table.insert(managers, "pkg_config")