diff options
| author | ruki <[email protected]> | 2021-12-14 20:01:59 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-12-14 20:01:59 +0800 |
| commit | e24fc356c1cceb9e08d3d542657cc1debbf7b268 (patch) | |
| tree | b8c25bb060c055af897246f62d7f88a13c6ffc0c | |
| parent | 87f599c961f5cbd8a8af63cb4ce3935357e130ee (diff) | |
| parent | 4a73b8dc0701c896a794deb751e6da5dfaebb28a (diff) | |
Merge pull request #1910 from cherichy/patch-1
Fix cmake find bug on windows.
| -rw-r--r-- | xmake/modules/package/manager/cmake/find_package.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/modules/package/manager/cmake/find_package.lua b/xmake/modules/package/manager/cmake/find_package.lua index e4099f73d..22ebc711b 100644 --- a/xmake/modules/package/manager/cmake/find_package.lua +++ b/xmake/modules/package/manager/cmake/find_package.lua @@ -201,7 +201,8 @@ function _find_package(cmake, name, opt) -- get links and linkdirs local linkdir = path.directory(library) - if linkdir ~= "." then + linkdir = path.translate(linkdir) + if linkdir ~= "." and not linkdir:startswith(workdir) then linkdirs = linkdirs or {} table.insert(linkdirs, linkdir) local link = target.linkname(path.filename(library)) |
