diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-05-16 21:59:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-16 21:59:10 +0200 |
commit | 9e8598fb1ca359143600d6bb2e8b317126a86bcc (patch) | |
tree | 677c51b708937ee8fbcdb2da8e180e874878d77a /src/Bindings/CheckBindingsDependencies.lua | |
parent | Travis: Fix ccache on debug builds (#4741) (diff) | |
download | cuberite-9e8598fb1ca359143600d6bb2e8b317126a86bcc.tar cuberite-9e8598fb1ca359143600d6bb2e8b317126a86bcc.tar.gz cuberite-9e8598fb1ca359143600d6bb2e8b317126a86bcc.tar.bz2 cuberite-9e8598fb1ca359143600d6bb2e8b317126a86bcc.tar.lz cuberite-9e8598fb1ca359143600d6bb2e8b317126a86bcc.tar.xz cuberite-9e8598fb1ca359143600d6bb2e8b317126a86bcc.tar.zst cuberite-9e8598fb1ca359143600d6bb2e8b317126a86bcc.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Bindings/CheckBindingsDependencies.lua | 19 |
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 |