refactor: reorganize submodule structure and enhance CMake configuration
- Moved all third-party libraries (SDL, ImGui, Asar, etc.) from `src/lib/` and `third_party/` to a new `ext/` directory for better organization and clarity in dependency management. - Updated CMake configuration to reflect the new paths, ensuring all targets and includes point to the `ext/` directory. - Enhanced CMake presets to support new build options for AI and gRPC features, improving modularity and build flexibility. - Added new feature flags for agent UI and remote automation, allowing for more granular control over build configurations. - Updated documentation to reflect changes in the project structure and build options, ensuring clarity for contributors and users.
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
|
||||
# Core build options
|
||||
option(YAZE_BUILD_GUI "Build GUI application" ON)
|
||||
option(YAZE_BUILD_CLI "Build CLI tools (z3ed)" ON)
|
||||
option(YAZE_BUILD_CLI "Build CLI tools (shared libraries)" ON)
|
||||
option(YAZE_BUILD_Z3ED "Build z3ed CLI executable" ON)
|
||||
option(YAZE_BUILD_EMU "Build emulator components" ON)
|
||||
option(YAZE_BUILD_LIB "Build static library" ON)
|
||||
option(YAZE_BUILD_TESTS "Build test suite" ON)
|
||||
@@ -13,6 +14,24 @@ option(YAZE_ENABLE_GRPC "Enable gRPC agent support" ON)
|
||||
option(YAZE_ENABLE_JSON "Enable JSON support" ON)
|
||||
option(YAZE_ENABLE_AI "Enable AI agent features" ON)
|
||||
|
||||
# Advanced feature toggles
|
||||
option(YAZE_ENABLE_REMOTE_AUTOMATION
|
||||
"Enable remote automation services (gRPC/protobuf servers + GUI automation clients)"
|
||||
${YAZE_ENABLE_GRPC})
|
||||
option(YAZE_ENABLE_AI_RUNTIME
|
||||
"Enable AI runtime integrations (Gemini/Ollama, advanced routing, proposal planning)"
|
||||
${YAZE_ENABLE_AI})
|
||||
option(YAZE_BUILD_AGENT_UI
|
||||
"Build ImGui-based agent/chat panels inside the GUI"
|
||||
${YAZE_BUILD_GUI})
|
||||
option(YAZE_ENABLE_AGENT_CLI
|
||||
"Build the conversational agent CLI stack (z3ed agent commands)"
|
||||
${YAZE_BUILD_CLI})
|
||||
|
||||
if((YAZE_BUILD_CLI OR YAZE_BUILD_Z3ED) AND NOT YAZE_ENABLE_AGENT_CLI)
|
||||
set(YAZE_ENABLE_AGENT_CLI ON CACHE BOOL "Build the conversational agent CLI stack (z3ed agent commands)" FORCE)
|
||||
endif()
|
||||
|
||||
# Build optimizations
|
||||
option(YAZE_ENABLE_LTO "Enable link-time optimization" OFF)
|
||||
option(YAZE_ENABLE_SANITIZERS "Enable AddressSanitizer/UBSanitizer" OFF)
|
||||
@@ -33,6 +52,14 @@ option(YAZE_INSTALL_LIB "Install static library" OFF)
|
||||
option(YAZE_INSTALL_HEADERS "Install public headers" ON)
|
||||
|
||||
# Set preprocessor definitions based on options
|
||||
if(YAZE_ENABLE_REMOTE_AUTOMATION AND NOT YAZE_ENABLE_GRPC)
|
||||
set(YAZE_ENABLE_GRPC ON CACHE BOOL "Enable gRPC agent support" FORCE)
|
||||
endif()
|
||||
|
||||
if(NOT YAZE_ENABLE_REMOTE_AUTOMATION)
|
||||
set(YAZE_ENABLE_GRPC OFF CACHE BOOL "Enable gRPC agent support" FORCE)
|
||||
endif()
|
||||
|
||||
if(YAZE_ENABLE_GRPC)
|
||||
add_compile_definitions(YAZE_WITH_GRPC)
|
||||
endif()
|
||||
@@ -41,6 +68,14 @@ if(YAZE_ENABLE_JSON)
|
||||
add_compile_definitions(YAZE_WITH_JSON)
|
||||
endif()
|
||||
|
||||
if(YAZE_ENABLE_AI_RUNTIME AND NOT YAZE_ENABLE_AI)
|
||||
set(YAZE_ENABLE_AI ON CACHE BOOL "Enable AI agent features" FORCE)
|
||||
endif()
|
||||
|
||||
if(NOT YAZE_ENABLE_AI_RUNTIME)
|
||||
set(YAZE_ENABLE_AI OFF CACHE BOOL "Enable AI agent features" FORCE)
|
||||
endif()
|
||||
|
||||
if(YAZE_ENABLE_AI)
|
||||
add_compile_definitions(Z3ED_AI)
|
||||
endif()
|
||||
@@ -49,12 +84,17 @@ endif()
|
||||
message(STATUS "=== YAZE Build Configuration ===")
|
||||
message(STATUS "GUI Application: ${YAZE_BUILD_GUI}")
|
||||
message(STATUS "CLI Tools: ${YAZE_BUILD_CLI}")
|
||||
message(STATUS "z3ed CLI: ${YAZE_BUILD_Z3ED}")
|
||||
message(STATUS "Emulator: ${YAZE_BUILD_EMU}")
|
||||
message(STATUS "Static Library: ${YAZE_BUILD_LIB}")
|
||||
message(STATUS "Tests: ${YAZE_BUILD_TESTS}")
|
||||
message(STATUS "gRPC Support: ${YAZE_ENABLE_GRPC}")
|
||||
message(STATUS "Remote Automation: ${YAZE_ENABLE_REMOTE_AUTOMATION}")
|
||||
message(STATUS "JSON Support: ${YAZE_ENABLE_JSON}")
|
||||
message(STATUS "AI Features: ${YAZE_ENABLE_AI}")
|
||||
message(STATUS "AI Runtime: ${YAZE_ENABLE_AI_RUNTIME}")
|
||||
message(STATUS "AI Features (legacy): ${YAZE_ENABLE_AI}")
|
||||
message(STATUS "Agent UI Panels: ${YAZE_BUILD_AGENT_UI}")
|
||||
message(STATUS "Agent CLI Stack: ${YAZE_ENABLE_AGENT_CLI}")
|
||||
message(STATUS "LTO: ${YAZE_ENABLE_LTO}")
|
||||
message(STATUS "Sanitizers: ${YAZE_ENABLE_SANITIZERS}")
|
||||
message(STATUS "Coverage: ${YAZE_ENABLE_COVERAGE}")
|
||||
|
||||
Reference in New Issue
Block a user