diff options
| author | ruki <[email protected]> | 2019-09-03 23:02:23 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-09-03 12:14:18 +0800 |
| commit | 4ef41f3882fe0c7391d5d0689a7fd72baca7da5d (patch) | |
| tree | 64185640e17418a631fcd54c4ab19f95bd39971c | |
| parent | 978bdb3c3e034afc17f29dc3688bd76a0abde801 (diff) | |
improve vcpkg find_package
| -rw-r--r-- | xmake/modules/package/manager/vcpkg/find_package.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xmake/modules/package/manager/vcpkg/find_package.lua b/xmake/modules/package/manager/vcpkg/find_package.lua index 774d455b6..aa47e35a1 100644 --- a/xmake/modules/package/manager/vcpkg/find_package.lua +++ b/xmake/modules/package/manager/vcpkg/find_package.lua @@ -82,6 +82,15 @@ function main(name, opt) table.insert(result.links, target.linkname(path.filename(line))) end end + + -- add shared library directory (/bin/) to linkdirs for running with PATH on windows + if plat == "windows" and line:endswith(".dll") then + if line:find(plat .. (mode == "debug" and "/debug" or "") .. "/bin/", 1, true) then + result = result or {} + result.linkdirs = result.linkdirs or {} + table.insert(result.linkdirs, path.join(installdir, path.directory(line))) + end + end end end |
