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:
scawful
2025-11-16 18:27:37 -05:00
parent 8635660d9d
commit a5d98ad83c
39 changed files with 654 additions and 156 deletions

View File

@@ -1,10 +1,10 @@
# Dear ImGui dependency management
# Uses the bundled ImGui in src/lib/imgui
# Uses the bundled ImGui in ext/imgui
message(STATUS "Setting up Dear ImGui from bundled sources")
# Use the bundled ImGui from src/lib/imgui
set(IMGUI_DIR ${CMAKE_SOURCE_DIR}/src/lib/imgui)
# Use the bundled ImGui from ext/imgui
set(IMGUI_DIR ${CMAKE_SOURCE_DIR}/ext/imgui)
# Create ImGui library with core files from bundled source
add_library(ImGui STATIC
@@ -35,7 +35,7 @@ message(STATUS "Created ImGui target from bundled source at ${IMGUI_DIR}")
# Create ImGui Test Engine for test automation (if tests are enabled)
if(YAZE_BUILD_TESTS)
set(IMGUI_TEST_ENGINE_DIR ${CMAKE_SOURCE_DIR}/src/lib/imgui_test_engine/imgui_test_engine)
set(IMGUI_TEST_ENGINE_DIR ${CMAKE_SOURCE_DIR}/ext/imgui_test_engine/imgui_test_engine)
if(EXISTS ${IMGUI_TEST_ENGINE_DIR})
set(IMGUI_TEST_ENGINE_SOURCES
@@ -53,7 +53,7 @@ if(YAZE_BUILD_TESTS)
target_include_directories(ImGuiTestEngine PUBLIC
${IMGUI_DIR}
${IMGUI_TEST_ENGINE_DIR}
${CMAKE_SOURCE_DIR}/src/lib
${CMAKE_SOURCE_DIR}/ext
)
target_compile_features(ImGuiTestEngine PUBLIC cxx_std_17)
target_link_libraries(ImGuiTestEngine PUBLIC ImGui ${YAZE_SDL2_TARGETS})

View File

@@ -4,14 +4,14 @@ if(NOT YAZE_ENABLE_JSON)
return()
endif()
message(STATUS "Setting up nlohmann_json with local third_party")
message(STATUS "Setting up nlohmann_json with local ext directory")
# Use the bundled nlohmann_json from third_party
# Use the bundled nlohmann_json from ext/json
set(JSON_BuildTests OFF CACHE BOOL "" FORCE)
set(JSON_Install OFF CACHE BOOL "" FORCE)
set(JSON_MultipleHeaders OFF CACHE BOOL "" FORCE)
add_subdirectory(${CMAKE_SOURCE_DIR}/third_party/json EXCLUDE_FROM_ALL)
add_subdirectory(${CMAKE_SOURCE_DIR}/ext/json EXCLUDE_FROM_ALL)
# Verify target is available
if(TARGET nlohmann_json::nlohmann_json)
@@ -25,10 +25,7 @@ else()
endif()
# Export for use in other CMake files
set(YAZE_JSON_TARGETS
nlohmann_json::nlohmann_json
PARENT_SCOPE
)
set(YAZE_JSON_TARGETS nlohmann_json::nlohmann_json CACHE INTERNAL "nlohmann_json targets")
message(STATUS "nlohmann_json setup complete")