diff options
| author | ruki <[email protected]> | 2022-01-12 00:51:32 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-01-12 00:51:32 +0800 |
| commit | 11b52516ece319713d9d0e560234de87fa59df51 (patch) | |
| tree | fe4d4348bfde177a68d8035f7b696966c39bc973 | |
| parent | ff09778ea6494e39e3375e83fe5673cc7735b25e (diff) | |
improve vcpkg.find_package
| -rw-r--r-- | xmake/modules/package/manager/vcpkg/find_package.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xmake/modules/package/manager/vcpkg/find_package.lua b/xmake/modules/package/manager/vcpkg/find_package.lua index e61e56c29..b15844ede 100644 --- a/xmake/modules/package/manager/vcpkg/find_package.lua +++ b/xmake/modules/package/manager/vcpkg/find_package.lua @@ -79,10 +79,11 @@ function _find_package(vcpkgdir, name, opt) arch = configurations.arch(arch) -- get the vcpkg info directories - local infodirs = { - path.join(opt.installdir, "vcpkg_installed", "vcpkg", "info"), - path.join(vcpkgdir, "installed", "vcpkg", "info") - } + local infodirs = {} + if opt.installdir then + table.join2(infodirs, path.join(opt.installdir, "vcpkg_installed", "vcpkg", "info")) + end + table.join2(infodirs, path.join(vcpkgdir, "installed", "vcpkg", "info")) -- find the package info file, e.g. zlib_1.2.11-3_x86-windows[-static].list local triplet = arch .. "-" .. plat |
