Repository navigation
|
whilst working on the raw export.lua workspace "WorkspaceName"
architecture"x86_64"
configurations { "Debug", "Release" }
project "ProjectName"
kind "ConsoleApp"
language "C"
targetdir "bin/%{cfg.buildcfg}"
files { "src/**.c", "include/**.h" }
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"config.fileconfigsfunction config.fileConfigs(cfg)
local fconfigs = {}
local tr = p.project.getsourcetree(cfg.project)
if #tr.children > 0 then
p.tree.traverse(tr, {
onleaf = function(node)
local fcfg = p.fileconfig.getconfig(node, cfg)
if fcfg then
table.insert(fconfigs, fcfg)
end
end
})
end
return fconfigs;
end
config.filesfunction config.files(cfg)
local fileConfigs = config.fileConfigs(cfg)
for _, fcfg in ipairs(fileConfigs) do
print(fcfg.path)
end
endthere are probably allot of mistakes in said code if seen pls let me also now pls. |
Answered by
lolrobbe2
Aug 26, 2026
Replies: 1 comment 2 replies
|
It is not clear for me what you want, what you got. I think you want node data of the traversal |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Jarod42 found the solution:
(don't know if this is the right way of doing this but it works)
wich gives this:
{ "name":"ProjectName", "kind":"ConsoleApp", "language":"C", "files":[ "src/**.c", "include/**.h" ], "configurations": { "Debug":{ }, "Release":{ …