summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-05-14 00:54:22 +0800
committerruki <[email protected]>2024-05-14 00:54:22 +0800
commit0c7941e96868550daf639cfd50762a6d2b03f12e (patch)
tree0f71fb36fdc7a5b568fd88efe17c13f4ca3fa5e5
parent5148f8f3c0c492810c85f42dbc09a89dc8201d2e (diff)
remove linkdirs for linkpath
-rw-r--r--xmake/core/project/target.lua24
1 files changed, 18 insertions, 6 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index 03e7ff626..3b98e15f2 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -337,10 +337,16 @@ function _instance:_get_from_packages(name, result_values, result_sources, opt)
local compvalues = info[name]
-- use full link path instead of links
-- @see https://github.com/xmake-io/xmake/issues/5066
- if name == "links" and configinfo and configinfo.linkpath then
+ if configinfo and configinfo.linkpath then
local libfiles = info.libfiles
- if libfiles then
- compvalues = _filter_libfiles(libfiles)
+ if name == "links" then
+ if libfiles then
+ compvalues = _filter_libfiles(libfiles)
+ end
+ elseif name == "linkdirs" then
+ if libfiles then
+ compvalues = nil
+ end
end
end
table.join2(values, compvalues)
@@ -367,10 +373,16 @@ function _instance:_get_from_packages(name, result_values, result_sources, opt)
local values = pkg:get(name)
-- use full link path instead of links
-- @see https://github.com/xmake-io/xmake/issues/5066
- if name == "links" and configinfo and configinfo.linkpath then
+ if configinfo and configinfo.linkpath then
local libfiles = pkg:libraryfiles()
- if libfiles then
- values = _filter_libfiles(libfiles)
+ if name == "links" then
+ if libfiles then
+ values = _filter_libfiles(libfiles)
+ end
+ elseif name == "linkdirs" then
+ if libfiles then
+ values = nil
+ end
end
end
if values ~= nil then