43 lines
929 B
Lua
43 lines
929 B
Lua
local m = {}
|
|
|
|
local scriptdir = path.getabsolute(path.getdirectory(_SCRIPT))
|
|
local sfml = require("build-sfml")
|
|
function m.generateproject(liboutdir, intdir)
|
|
project"imgui-sfml"
|
|
cppdialect"c++17"
|
|
kind"staticLib"
|
|
targetdir (liboutdir)
|
|
objdir(intdir)
|
|
warnings"Off"
|
|
|
|
defines{"IMGUI_USER_CONFIG=\"imconfig-SFML.h\""}
|
|
|
|
sfml.link()
|
|
|
|
includedirs
|
|
{
|
|
path.join(scriptdir, "imgui-sfml"),
|
|
path.join(scriptdir, "imgui"),
|
|
}
|
|
|
|
files
|
|
{
|
|
path.join(scriptdir, "imgui-sfml/imgui-SFML.cpp"),
|
|
}
|
|
end
|
|
|
|
function m.config() -- use this in build imgui instead of link() to avoid circular dependency
|
|
|
|
defines { "IMGUI_USER_CONFIG=\"imconfig-SFML.h\"" }
|
|
|
|
externalincludedirs { path.join(scriptdir, "imgui-sfml") }
|
|
|
|
sfml.link()
|
|
end
|
|
|
|
function m.link()
|
|
links {"imgui-sfml"}
|
|
m.config()
|
|
end
|
|
|
|
return m |