build: Refactor CMake build system

This new architecture decomposes the project into several distict static
libraries: common, host, kvm, and frontend.

By using static libraries, changes within one module will only require
that library to be re-linked, rather than recompiling and re-linking the
entire executable.

The third party library ImGui is now built as a static library target.

Signed-off-by: Ronald Caesar <github43132@proton.me>
This commit is contained in:
Ronald Caesar 2025-09-14 13:28:09 -04:00
parent 8b483849f4
commit a3ed44003b
16 changed files with 133 additions and 302 deletions

View file

@ -2,14 +2,14 @@
#include <imgui.h>
#include <math.h>
#include "kvm/kvm.h"
#include "common/Assert.h"
#include <assert.h>"
int8_t gui::panel::render_performance_panel(gui::panel::performance_panel_t* panel, performance_data_t* data,
std::chrono::steady_clock::time_point* last_render)
{
ASSERT(nullptr != panel);
ASSERT(nullptr != data);
ASSERT(nullptr != last_render);
assert(nullptr != panel);
assert(nullptr != data);
assert(nullptr != last_render);
bool is_visible = true;
(void)::ImGui::Begin(PANEL_NAME_PERFORMANCE, &is_visible);
@ -82,7 +82,7 @@ int8_t gui::panel::render_performance_panel(gui::panel::performance_panel_t* pan
int8_t gui::panel::render_cpu_panel(bool* show_cpu_result_popup)
{
ASSERT(nullptr != show_cpu_result_popup);
assert(nullptr != show_cpu_result_popup);
bool is_visible = true;
(void)::ImGui::Begin(PANEL_NAME_CPU, &is_visible, ImGuiWindowFlags_NoCollapse);