local m = {}

local rootdir = path.join(path.getabsolute(path.getdirectory(_SCRIPT)), "../")
local imguisfml = require("build-imgui-sfml")

function m.generateproject(liboutdir, intdir)
    project"imgui"
    cppdialect"c++17"
    kind"staticLib"
    targetdir (liboutdir)
    objdir(intdir)
    warnings"Off"


    includedirs
    {
        path.join(rootdir, "imgui"),
    }

    files
    {
        path.join(rootdir, "imgui/imgui.cpp"),
        path.join(rootdir, "imgui/imgui_draw.cpp"),
        path.join(rootdir, "imgui/imgui_tables.cpp"),
        path.join(rootdir, "imgui/imgui_widgets.cpp"),
    }

    imguisfml.config() -- needed so imgui can be aware of imconfig-sfml.h
end

function m.link()
    links {"imgui"}

    includedirs { path.join(rootdir, "imgui") }
end

return m