detect backends folder in generator and backend_test

This commit is contained in:
Victor Bombi
2020-10-24 16:41:57 +02:00
parent a97c90ec4f
commit 9cb4b4f63c
2 changed files with 21 additions and 5 deletions

View File

@@ -395,7 +395,15 @@ save_data("./output/definitions.lua",serializeTableF(parser1.defsT))
-- end
--=================================Now implementations
local backends_folder
local ff,err = io.open ("../imgui/examples/imgui_impl_glfw.h" ,"r")
if ff then
backends_folder = "../imgui/examples/"
ff:close()
else
backends_folder = "../imgui/backends/"
end
local parser2
if #implementations > 0 then
@@ -405,7 +413,7 @@ if #implementations > 0 then
local config = require"config_generator"
for i,impl in ipairs(implementations) do
local source = [[../imgui/examples/imgui_impl_]].. impl .. ".h "
local source = backends_folder .. [[imgui_impl_]].. impl .. ".h "
local locati = [[imgui_impl_]].. impl
local define_cmd = COMPILER=="cl" and [[ /E /D]] or [[ -E -D]]