local m = {} local rootdir = path.join(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(rootdir, "imgui-sfml"), path.join(rootdir, "imgui"), } files { path.join(rootdir, "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\"" } includedirs { path.join(rootdir, "imgui-sfml") } sfml.link() end function m.link() links {"imgui-sfml"} m.config() end return m