From 7cbd5c62502bc2c0a8a254db2e7990486a5bbc78 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 24 Oct 2019 00:42:39 +0800 Subject: improve to find_zlib --- xmake/modules/detect/packages/find_zlib.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xmake/modules/detect/packages/find_zlib.lua b/xmake/modules/detect/packages/find_zlib.lua index f9cca9f0c..17a289fa8 100644 --- a/xmake/modules/detect/packages/find_zlib.lua +++ b/xmake/modules/detect/packages/find_zlib.lua @@ -21,6 +21,7 @@ -- imports import("lib.detect.find_path") import("lib.detect.find_library") +import("package.manager.find_package") -- find zlib -- @@ -68,8 +69,14 @@ function main(opt) end end end - - -- ok return result end + + -- find it by the builtin script first + local result = opt.find_package("zlib", opt) + if not result then + -- find it from the link name: z + result = find_package("system::z", opt) + end + return result end -- cgit v1.3.1