local m = {}

local scriptdir = path.getabsolute(path.getdirectory(_SCRIPT))
local sfml = require("vendor/sfml/build-sfml")
function m.generateproject(liboutdir, intdir)
    project"imgui-sfml"
        cppdialect"c++17"
        kind"staticLib"
        targetdir (liboutdir)
        objdir(intdir)
        warnings"Off"

        sfml.link()

        includedirs
        {
            scriptdir,
        }

        files
        {
            path.join(scriptdir, "imgui.cpp"),
            path.join(scriptdir, "imgui_draw.cpp"),
            path.join(scriptdir, "imgui_tables.cpp"),
            path.join(scriptdir, "imgui_widgets.cpp"),
            path.join(scriptdir, "imgui-SFML.cpp"),
        }
end

function m.link()
    externalincludedirs{scriptdir, path.join(scriptdir, "../sfml/include")}
    links {"imgui-sfml"}
end

return m