summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcmolocznik <[email protected]>2024-11-02 08:30:16 +0800
committercmolocznik <[email protected]>2024-11-02 08:30:16 +0800
commit7ff6d7e178e023fc22b77623dee445a3de064622 (patch)
tree52cd666275e4596e26e20358ae01c62eda7e011f
parentc6bb229de4c708506344016304b74f457f304434 (diff)
fixed error when generating cmake (xmake project -k cmake) for a target that has a dependency (via add_deps) on another target.
error: method 'insert' is not callable (a nil value) called insert as a method on a table instead of table.insert
-rw-r--r--xmake/plugins/project/cmake/cmakelists.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua
index 3002079a0..598a1aad3 100644
--- a/xmake/plugins/project/cmake/cmakelists.lua
+++ b/xmake/plugins/project/cmake/cmakelists.lua
@@ -441,7 +441,7 @@ function _add_target_dependencies(cmakelists, target)
local deps = {}
for _, dep in ipairs(target:orderdeps()) do
if not dep:is_object() then
- deps:insert(dep:name())
+ table.insert(deps, dep:name())
end
end