summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/package/manager/cmake/find_package.lua3
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))