summaryrefslogtreecommitdiffstats
path: root/src/Bindings/CheckBindingsDependencies.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/Bindings/CheckBindingsDependencies.lua')
-rw-r--r--src/Bindings/CheckBindingsDependencies.lua19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/Bindings/CheckBindingsDependencies.lua b/src/Bindings/CheckBindingsDependencies.lua
index c0565ead8..50e915311 100644
--- a/src/Bindings/CheckBindingsDependencies.lua
+++ b/src/Bindings/CheckBindingsDependencies.lua
@@ -19,8 +19,8 @@ local g_ShouldIgnorePkg =
local g_ShouldIgnoreCMake =
{
["tolua"] = true,
- ["../Bindings/AllToLua.pkg"] = true,
- ["../Bindings/BindingsProcessor.lua"] = true,
+ ["Bindings/AllToLua.pkg"] = true,
+ ["Bindings/BindingsProcessor.lua"] = true,
}
@@ -37,7 +37,17 @@ local function getAllToLuaPkgFiles()
if (g_ShouldIgnorePkg[a_FileName]) then
return
end
- a_FileName = a_FileName:gsub("../Bindings/", "") -- Normalize the path
+
+ -- Normalize the path: AllToLua is relative to src\Bindings
+ -- but the CMake dependencies list is relative to src\
+ a_FileName, cnt = a_FileName:gsub("%.%./", "")
+
+ -- If no replacements were done, this entry must point to a file
+ -- inside the Bindings folder; normalize it
+ if cnt == 0 then
+ a_FileName = "Bindings/" .. a_FileName
+ end
+
table.insert(res, a_FileName)
res[a_FileName] = true
end
@@ -54,7 +64,7 @@ end
--- Returns a sorted list of all files listed as dependencies in CMakeLists.txt
-- The returned table has both an array part (list of files) and a dictionary part ("filename" -> true)
local function getCMakeListsFiles()
- local f = assert(io.open("CMakeLists.txt", "r"))
+ local f = assert(io.open("../../CMake/GenerateBindings.cmake", "r"))
local contents = f:read("*all")
f:close()
local res = {}
@@ -69,7 +79,6 @@ local function getCMakeListsFiles()
if (g_ShouldIgnoreCMake[a_FileName]) then
return
end
- a_FileName = a_FileName:gsub("../Bindings/", "") -- Normalize the path
table.insert(res, a_FileName)
res[a_FileName] = true
end