mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-13 21:28:30 +01:00
adding flags to generator.lua
This commit is contained in:
@@ -8,6 +8,7 @@ local script_args = {...}
|
|||||||
local COMPILER = script_args[1]
|
local COMPILER = script_args[1]
|
||||||
local INTERNAL_GENERATION = script_args[2]:match("internal") and true or false
|
local INTERNAL_GENERATION = script_args[2]:match("internal") and true or false
|
||||||
local FREETYPE_GENERATION = script_args[2]:match("freetype") and true or false
|
local FREETYPE_GENERATION = script_args[2]:match("freetype") and true or false
|
||||||
|
local CFLAGS = ""
|
||||||
local CPRE,CTEST
|
local CPRE,CTEST
|
||||||
if COMPILER == "gcc" or COMPILER == "clang" then
|
if COMPILER == "gcc" or COMPILER == "clang" then
|
||||||
CPRE = COMPILER..[[ -E -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS -DIMGUI_API="" -DIMGUI_IMPL_API="" ]]
|
CPRE = COMPILER..[[ -E -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS -DIMGUI_API="" -DIMGUI_IMPL_API="" ]]
|
||||||
@@ -44,7 +45,18 @@ print("INTERNAL_GENERATION",INTERNAL_GENERATION)
|
|||||||
print("FREETYPE_GENERATION",FREETYPE_GENERATION)
|
print("FREETYPE_GENERATION",FREETYPE_GENERATION)
|
||||||
--get implementations
|
--get implementations
|
||||||
local implementations = {}
|
local implementations = {}
|
||||||
for i=3,#script_args do table.insert(implementations,script_args[i]) end
|
for i=3,#script_args do
|
||||||
|
if script_args[i]:match("^%-") then
|
||||||
|
local key, value = script_args[i]:match("^(.+)=(.+)$")
|
||||||
|
if key and value then
|
||||||
|
CFLAGS = CFLAGS .. " " .. key .. "=\"" .. value:gsub("\"", "\\\"") .. "\"";
|
||||||
|
else
|
||||||
|
CFLAGS = CFLAGS .. " " .. script_args[i]
|
||||||
|
end
|
||||||
|
else
|
||||||
|
table.insert(implementations,script_args[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
||||||
--this table has the functions to be skipped in generation
|
--this table has the functions to be skipped in generation
|
||||||
@@ -335,7 +347,6 @@ end
|
|||||||
print("IMGUI_VERSION",imgui_version)
|
print("IMGUI_VERSION",imgui_version)
|
||||||
--get some defines----------------------------
|
--get some defines----------------------------
|
||||||
gdefines = get_defines{"IMGUI_VERSION","FLT_MAX"}
|
gdefines = get_defines{"IMGUI_VERSION","FLT_MAX"}
|
||||||
|
|
||||||
|
|
||||||
--funtion for parsing imgui headers
|
--funtion for parsing imgui headers
|
||||||
local function parseImGuiHeader(header,names)
|
local function parseImGuiHeader(header,names)
|
||||||
|
Reference in New Issue
Block a user