summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-10-04 22:58:24 +0800
committerruki <[email protected]>2018-10-04 11:50:26 +0800
commit83b5cc5d800bf2b88ea0b7f2815c1c6a58465101 (patch)
tree10b0608a1f451a2a4257510f116397fa1740c12a
parent5ff766127e272bc8aa7f358591f18a8b3874a5ff (diff)
improve to find package
-rw-r--r--xmake/core/sandbox/modules/import/lib/detect/find_package.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_package.lua b/xmake/core/sandbox/modules/import/lib/detect/find_package.lua
index ccecae775..6506dcffa 100644
--- a/xmake/core/sandbox/modules/import/lib/detect/find_package.lua
+++ b/xmake/core/sandbox/modules/import/lib/detect/find_package.lua
@@ -138,17 +138,19 @@ function sandbox_lib_detect_find_package._find_from_prefixdirs(name, opt)
-- get prefix directories
local prefixdirs = table.wrap(opt.prefixdirs)
- local platsubdirs = path.join(config.get("plat") or os.host(), config.get("arch") or os.arch(), "release")
+ local platsubdirs = path.join(config.get("plat") or os.host(), config.get("arch") or os.arch())
if #prefixdirs == 0 then
- table.insert(prefixdirs, path.join(config.directory(), "prefix", platsubdirs))
- table.insert(prefixdirs, path.join(global.directory(), "prefix", platsubdirs))
+ table.insert(prefixdirs, path.join(config.directory(), "prefix", platsubdirs, "release"))
+ table.insert(prefixdirs, path.join(global.directory(), "prefix", platsubdirs, "release"))
end
-- find the prefix info file of package, .e.g z/zlib/1.2.11/prefixinfo.txt
local packagedirs = {}
local packagepath = path.join(name:sub(1, 1), name, "*")
- table.insert(packagedirs, path.join(config.directory(), "installed", platsubdirs, packagepath))
- table.insert(packagedirs, path.join(global.directory(), "installed", platsubdirs, packagepath))
+ table.insert(packagedirs, path.join(config.directory(), "installed", platsubdirs, "debug", packagepath))
+ table.insert(packagedirs, path.join(config.directory(), "installed", platsubdirs, "release", packagepath))
+ table.insert(packagedirs, path.join(global.directory(), "installed", platsubdirs, "debug", ackagepath))
+ table.insert(packagedirs, path.join(global.directory(), "installed", platsubdirs, "release", ackagepath))
local prefixfile = find_file("prefixinfo.txt", packagedirs)
-- get the include and link directories