summaryrefslogtreecommitdiff
path: root/xmake/modules/lib
diff options
context:
space:
mode:
authorPaul Reilly <[email protected]>2020-09-17 16:44:27 +0100
committerPaul Reilly <[email protected]>2020-09-17 16:44:27 +0100
commit1b11965798c552d338e708595ebc6e944711cd40 (patch)
tree82827818cd74a3b12e2e884e5b05ca23e1aa42e5 /xmake/modules/lib
parent86ad96245f082ec0b7c188385768d4b88d375256 (diff)
fix returning found package manager, tidy assembling log message
Diffstat (limited to 'xmake/modules/lib')
-rw-r--r--xmake/modules/lib/detect/find_package.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/xmake/modules/lib/detect/find_package.lua b/xmake/modules/lib/detect/find_package.lua
index a0f44cb74..0aa0f17e1 100644
--- a/xmake/modules/lib/detect/find_package.lua
+++ b/xmake/modules/lib/detect/find_package.lua
@@ -74,8 +74,8 @@ function main(name, opt)
end
-- find package
- local found_manager_name, package_name, orig_manager_name
- result, found_manager_name, package_name, orig_manager_name = find_package(name, opt)
+ local found_manager_name, package_name
+ result, found_manager_name, package_name = find_package(name, opt)
-- cache result
cacheinfo[name] = result and result or false
@@ -87,8 +87,7 @@ function main(name, opt)
-- only display manager of found package if the package we searched for
-- did not specify a package manager
- found_manager_name = found_manager_name or ""
- local display_manager = orig_manager_name == found_manager_name and "" or found_manager_name .. "::"
+ local display_manager = name:find("::", 1, true) and "" or (found_manager_name or "") .. "::"
local display_name = display_manager .. package_name
cprint("checking for %s ... ${color.success}%s %s", name, display_name, result.version and result.version or "")
else