This is a minimal example of a working bgfx system with flecs v2. It requires some of the flecs modules to run such as gui, input, and sdl2. To manage BGFX with C it uses bgfx.cmake
For a fully working example of bgfx+imgui (docking branch) with CMake please refer to bgfx_imgui branch