summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2019-10-24 00:42:39 +0800
committerruki <[email protected]>2019-10-23 22:15:59 +0800
commit7cbd5c62502bc2c0a8a254db2e7990486a5bbc78 (patch)
treef250a0c7f2e9d7201e1a6d1512382a7ef66330e2
parent76775e15e26ab1477df1aac77d4d8ed2f92675bd (diff)
improve to find_zlib
-rw-r--r--xmake/modules/detect/packages/find_zlib.lua11
1 files 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