From 7ff6d7e178e023fc22b77623dee445a3de064622 Mon Sep 17 00:00:00 2001 From: cmolocznik Date: Sat, 2 Nov 2024 08:30:16 +0800 Subject: 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 --- xmake/plugins/project/cmake/cmakelists.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.3.1