Update CMake configuration and .clangd settings for improved build management

- Removed unnecessary compile flags from .clangd to streamline configuration.
- Added YAZE_BUILD_LIB option in CMakeLists.txt for conditional library building in minimal builds.
- Enhanced SDL2 CMake configuration to set include directories for bundled SDL, ensuring proper integration.
- Updated test CMakeLists.txt to conditionally link yaze_c and ImGuiTestEngine based on build options, improving modularity and flexibility.
- Refactored test_editor.cc and test_editor.h to conditionally include ImGuiTestEngine headers and manage engine initialization based on availability.
This commit is contained in:
scawful
2025-09-26 13:51:02 -04:00
parent 53787872b2
commit cbce2730b6
8 changed files with 55 additions and 11 deletions

View File

@@ -2,8 +2,11 @@
#define YAZE_TEST_INTEGRATION_TEST_EDITOR_H
#include "app/editor/editor.h"
#ifdef IMGUI_ENABLE_TEST_ENGINE
#include "imgui_test_engine/imgui_te_context.h"
#include "imgui_test_engine/imgui_te_engine.h"
#endif
namespace yaze {
namespace test {
@@ -44,10 +47,16 @@ class TestEditor : public yaze::editor::Editor {
return absl::UnimplementedError("Not implemented");
}
#ifdef IMGUI_ENABLE_TEST_ENGINE
void RegisterTests(ImGuiTestEngine* engine);
#endif
private:
#ifdef IMGUI_ENABLE_TEST_ENGINE
ImGuiTestEngine* engine_;
#else
void* engine_; // Placeholder when test engine is disabled
#endif
};
int RunIntegrationTest();