refactor(cmake): update include paths and defer test support linkage
- Updated include paths in several source files to reflect the new directory structure, ensuring consistency across the project. - Deferred the linkage of the yaze_test_support library to the test.cmake file for better dependency management and ordering. Benefits: - Improved organization of include paths for better maintainability. - Enhanced modularity by managing test dependencies separately.
This commit is contained in:
@@ -108,10 +108,7 @@ target_link_libraries(yaze_editor PUBLIC
|
||||
ImGui
|
||||
)
|
||||
|
||||
# Link test support library if testing is enabled (for TestManager)
|
||||
if(YAZE_BUILD_TESTS AND TARGET yaze_test_support)
|
||||
target_link_libraries(yaze_editor PUBLIC yaze_test_support)
|
||||
endif()
|
||||
# Note: yaze_test_support linking is deferred to test.cmake to ensure proper ordering
|
||||
|
||||
if(YAZE_WITH_JSON)
|
||||
target_include_directories(yaze_editor PUBLIC
|
||||
|
||||
@@ -54,12 +54,14 @@
|
||||
#include "app/editor/system/toast_manager.h"
|
||||
#include "app/emu/emulator.h"
|
||||
#include "app/gfx/performance/performance_dashboard.h"
|
||||
#include "editor/editor.h"
|
||||
#include "app/editor/editor.h"
|
||||
#ifdef YAZE_WITH_GRPC
|
||||
#include "app/core/service/screenshot_utils.h"
|
||||
#include "app/editor/agent/agent_chat_widget.h"
|
||||
#include "cli/service/agent/agent_control_server.h"
|
||||
#include "cli/service/agent/conversational_agent_service.h"
|
||||
#include "cli/service/ai/gemini_ai_service.h"
|
||||
#include "absl/flags/flag.h"
|
||||
#endif
|
||||
#ifdef YAZE_WITH_GRPC
|
||||
#include "app/editor/agent/automation_bridge.h"
|
||||
@@ -539,6 +541,12 @@ void EditorManager::Initialize(gfx::IRenderer* renderer, const std::string& file
|
||||
context_.shortcut_manager.RegisterShortcut(
|
||||
"Proposal Drawer", {ImGuiKey_P, ImGuiMod_Ctrl},
|
||||
[this]() { proposal_drawer_.Toggle(); });
|
||||
|
||||
// Start the agent control server if the flag is set
|
||||
if (absl::GetFlag(FLAGS_agent_control)) {
|
||||
agent_control_server_ = std::make_unique<agent::AgentControlServer>(&emulator_);
|
||||
agent_control_server_->Start();
|
||||
}
|
||||
#endif
|
||||
|
||||
// Testing shortcuts (only when tests are enabled)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef YAZE_APP_EDITOR_EDITOR_MANAGER_H
|
||||
#define YAZE_APP_EDITOR_EDITOR_MANAGER_H
|
||||
|
||||
#include "editor/system/user_settings.h"
|
||||
#include "editor/ui/workspace_manager.h"
|
||||
#include "app/editor/system/user_settings.h"
|
||||
#include "app/editor/ui/workspace_manager.h"
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
|
||||
#include "imgui/imgui.h"
|
||||
@@ -278,6 +278,7 @@ class EditorManager {
|
||||
#ifdef YAZE_WITH_GRPC
|
||||
// Agent editor - manages chat, collaboration, and network coordination
|
||||
AgentEditor agent_editor_;
|
||||
std::unique_ptr<agent::AgentControlServer> agent_control_server_;
|
||||
#endif
|
||||
|
||||
std::string version_ = "";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "editor/overworld/overworld_editor.h"
|
||||
#include "app/editor/overworld/overworld_editor.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "absl/status/status.h"
|
||||
#include "app/editor/editor.h"
|
||||
#include "app/rom.h"
|
||||
#include "editor/system/user_settings.h"
|
||||
#include "app/editor/system/user_settings.h"
|
||||
#include "imgui/imgui.h"
|
||||
|
||||
namespace yaze {
|
||||
|
||||
@@ -21,7 +21,6 @@ if(YAZE_BUILD_EMU AND NOT YAZE_MINIMAL_BUILD)
|
||||
yaze_editor
|
||||
yaze_emulator
|
||||
yaze_agent
|
||||
yaze_test_support
|
||||
absl::flags
|
||||
absl::flags_parse
|
||||
absl::failure_signal_handler
|
||||
|
||||
@@ -16,6 +16,7 @@ if(YAZE_BUILD_TESTS)
|
||||
${CMAKE_SOURCE_DIR}/src/lib
|
||||
${CMAKE_SOURCE_DIR}/src/lib/imgui
|
||||
${CMAKE_SOURCE_DIR}/src/lib/imgui/backends
|
||||
${CMAKE_SOURCE_DIR}/src/lib/imgui_test_engine
|
||||
${CMAKE_SOURCE_DIR}/src/lib/SDL/include
|
||||
${CMAKE_BINARY_DIR}/src/lib/SDL/include
|
||||
${PROJECT_BINARY_DIR}
|
||||
|
||||
Reference in New Issue
Block a user