mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-10 11:58:30 +01:00
add preprocesor ifndef for including only once in cimgui_impl.h
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
#ifndef CIMGUI_IMPL_DEFINED
|
||||||
|
#define CIMGUI_IMPL_DEFINED
|
||||||
#ifdef CIMGUI_USE_GLFW
|
#ifdef CIMGUI_USE_GLFW
|
||||||
#ifdef CIMGUI_DEFINE_ENUMS_AND_STRUCTS
|
#ifdef CIMGUI_DEFINE_ENUMS_AND_STRUCTS
|
||||||
|
|
||||||
@@ -196,3 +198,4 @@ CIMGUI_API int ImGui_ImplVulkanH_GetMinImageCountFromPresentMode(VkPresentModeKH
|
|||||||
CIMGUI_API ImGui_ImplVulkanH_Window* ImGui_ImplVulkanH_Window_ImGui_ImplVulkanH_Window(void);
|
CIMGUI_API ImGui_ImplVulkanH_Window* ImGui_ImplVulkanH_Window_ImGui_ImplVulkanH_Window(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
#endif //CIMGUI_IMPL_DEFINED
|
||||||
|
@@ -460,7 +460,7 @@ if #implementations > 0 then
|
|||||||
parser2 = cpp2ffi.Parser()
|
parser2 = cpp2ffi.Parser()
|
||||||
|
|
||||||
local config = dofile(CONFIG_GENERATOR_PATH) --"./config_generator.lua"
|
local config = dofile(CONFIG_GENERATOR_PATH) --"./config_generator.lua"
|
||||||
local impl_str = ""
|
local impl_str = "#ifndef CIMGUI_IMPL_DEFINED\n#define CIMGUI_IMPL_DEFINED\n"
|
||||||
local impl_str_cpp = {}
|
local impl_str_cpp = {}
|
||||||
for i,impl in ipairs(implementations) do
|
for i,impl in ipairs(implementations) do
|
||||||
print("------------implementation:",impl)
|
print("------------implementation:",impl)
|
||||||
@@ -502,7 +502,7 @@ if #implementations > 0 then
|
|||||||
end
|
end
|
||||||
impl_str = impl_str.. table.concat(outtab)..cfuncsstr .. "\n#endif\n"
|
impl_str = impl_str.. table.concat(outtab)..cfuncsstr .. "\n#endif\n"
|
||||||
end
|
end
|
||||||
|
impl_str = impl_str .. "#endif //CIMGUI_IMPL_DEFINED\n"
|
||||||
parser2:do_parse()
|
parser2:do_parse()
|
||||||
save_data("./output/cimgui_impl.h",impl_str)
|
save_data("./output/cimgui_impl.h",impl_str)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user