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

@@ -27,14 +27,14 @@ if(WIN32)
endif()
# Fall back to bundled SDL if vcpkg not available or SDL2 not found
if(EXISTS "${CMAKE_SOURCE_DIR}/src/lib/SDL/CMakeLists.txt")
if(EXISTS "${CMAKE_SOURCE_DIR}/ext/SDL/CMakeLists.txt")
message(STATUS "○ vcpkg SDL2 not found, using bundled SDL2")
add_subdirectory(src/lib/SDL)
add_subdirectory(ext/SDL)
set(SDL_TARGETS SDL2-static)
set(SDL2_INCLUDE_DIR
${CMAKE_SOURCE_DIR}/src/lib/SDL/include
${CMAKE_BINARY_DIR}/src/lib/SDL/include
${CMAKE_BINARY_DIR}/src/lib/SDL/include-config-${CMAKE_BUILD_TYPE}
${CMAKE_SOURCE_DIR}/ext/SDL/include
${CMAKE_BINARY_DIR}/ext/SDL/include
${CMAKE_BINARY_DIR}/ext/SDL/include-config-${CMAKE_BUILD_TYPE}
)
set(SDL2_INCLUDE_DIRS ${SDL2_INCLUDE_DIR})
if(TARGET SDL2main)
@@ -47,12 +47,12 @@ if(WIN32)
endif()
elseif(UNIX OR MINGW)
# Non-Windows: use bundled SDL
add_subdirectory(src/lib/SDL)
add_subdirectory(ext/SDL)
set(SDL_TARGETS SDL2-static)
set(SDL2_INCLUDE_DIR
${CMAKE_SOURCE_DIR}/src/lib/SDL/include
${CMAKE_BINARY_DIR}/src/lib/SDL/include
${CMAKE_BINARY_DIR}/src/lib/SDL/include-config-${CMAKE_BUILD_TYPE}
${CMAKE_SOURCE_DIR}/ext/SDL/include
${CMAKE_BINARY_DIR}/ext/SDL/include
${CMAKE_BINARY_DIR}/ext/SDL/include-config-${CMAKE_BUILD_TYPE}
)
set(SDL2_INCLUDE_DIRS ${SDL2_INCLUDE_DIR})
message(STATUS "Using bundled SDL2")