diff options
| author | ruki <[email protected]> | 2023-09-13 22:37:55 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-09-13 22:37:55 +0800 |
| commit | 6f5d273b4bb94ad5ba718922bbb54c74ed57d06a (patch) | |
| tree | d4aa1988bb78e213832bee7cebe06bb05a3fd515 | |
| parent | 5946aefcaf1096a6466f23b512b119f3a0b7b715 (diff) | |
fix find package from brew on linux #4179
| -rw-r--r-- | xmake/modules/package/manager/brew/find_package.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xmake/modules/package/manager/brew/find_package.lua b/xmake/modules/package/manager/brew/find_package.lua index 4c0061bb8..15940f9fb 100644 --- a/xmake/modules/package/manager/brew/find_package.lua +++ b/xmake/modules/package/manager/brew/find_package.lua @@ -128,7 +128,14 @@ function main(name, opt) -- find package from xxx/lib, xxx/include if not result then local nameinfo = name:split('/') - local pkgdir = find_path("lib", path.join(brew_pkg_rootdir, nameinfo[1], "*")) + local pkgdir + if is_host("linux") then + -- /home/linuxbrew/.linuxbrew/opt/llvm + pkgdir = find_path("lib", path.join(brew_pkg_rootdir, nameinfo[1])) + else + -- /usr/local/Cellar/llvm/16.0.6 + pkgdir = find_path("lib", path.join(brew_pkg_rootdir, nameinfo[1], "*")) + end if pkgdir then local links = {} for _, libfile in ipairs(os.files(path.join(pkgdir, "lib", "*.a"))) do |
