summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2019-05-05 21:50:48 +0800
committerruki <[email protected]>2019-05-05 21:50:48 +0800
commitf97082c4db805cf7989eb6a2a1cd549a1d6d49a5 (patch)
tree7530d05a74a058c137b1e15cdd839b37fb0a2d32 /xmake/modules
parentdfdbe5da7702606001a2141082708f6ed5acd733 (diff)
improve fetch package and envs
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/package/manager/xmake/find_package.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/modules/package/manager/xmake/find_package.lua b/xmake/modules/package/manager/xmake/find_package.lua
index c589561a9..595612ba2 100644
--- a/xmake/modules/package/manager/xmake/find_package.lua
+++ b/xmake/modules/package/manager/xmake/find_package.lua
@@ -31,9 +31,14 @@ import("lib.detect.find_library")
-- find package from the repository (maybe only include and no links)
function _find_package_from_repo(name, opt)
+ -- check options
+ if not opt.version or not opt.buildhash then
+ return
+ end
+
-- find the manifest file of package, .e.g ~/.xmake/packages/z/zlib/1.1.12/ed41d5327fad3fc06fe376b4a94f62ef/manifest.txt
local packagedirs = {}
- table.insert(packagedirs, path.join(package.installdir(), name:sub(1, 1), name, opt.version or "*", opt.buildhash))
+ table.insert(packagedirs, path.join(package.installdir(), name:sub(1, 1), name, opt.version, opt.buildhash))
local manifest_file = find_file("manifest.txt", packagedirs)
if not manifest_file then
return