- Added new entries to `.pre-commit-config.yaml`, `cmake-format.yaml`, and `.github/dependabot.yml` to improve code quality checks and dependency updates. - Enhanced GitHub Actions workflows by adding new steps for testing and build retention. - Introduced support for the nlohmann_json library in CMake, allowing for conditional inclusion based on the `YAZE_ENABLE_JSON` option. - Updated CMake configurations to streamline SDL2 and gRPC integration, ensuring proper linking and target management. Benefits: - Improves code quality and consistency through automated checks and formatting. - Enhances dependency management and build reliability across platforms. - Provides flexibility for users to enable optional features, improving overall functionality.
63 lines
2.2 KiB
CMake
63 lines
2.2 KiB
CMake
# YAZE Build Options
|
|
# Centralized feature flags and build configuration
|
|
|
|
# Core build options
|
|
option(YAZE_BUILD_GUI "Build GUI application" ON)
|
|
option(YAZE_BUILD_CLI "Build CLI tools (z3ed)" 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)
|
|
|
|
# Feature flags
|
|
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)
|
|
|
|
# Build optimizations
|
|
option(YAZE_ENABLE_LTO "Enable link-time optimization" OFF)
|
|
option(YAZE_ENABLE_SANITIZERS "Enable AddressSanitizer/UBSanitizer" OFF)
|
|
option(YAZE_ENABLE_COVERAGE "Enable code coverage" OFF)
|
|
option(YAZE_UNITY_BUILD "Enable Unity (Jumbo) builds" OFF)
|
|
|
|
# Platform-specific options
|
|
option(YAZE_USE_VCPKG "Use vcpkg for Windows dependencies" OFF)
|
|
option(YAZE_USE_SYSTEM_DEPS "Use system package manager for dependencies" OFF)
|
|
|
|
# Development options
|
|
option(YAZE_ENABLE_ROM_TESTS "Enable tests that require ROM files" OFF)
|
|
option(YAZE_MINIMAL_BUILD "Minimal build for CI (disable optional features)" OFF)
|
|
option(YAZE_VERBOSE_BUILD "Verbose build output" OFF)
|
|
|
|
# Install options
|
|
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_GRPC)
|
|
add_compile_definitions(YAZE_WITH_GRPC)
|
|
endif()
|
|
|
|
if(YAZE_ENABLE_JSON)
|
|
add_compile_definitions(YAZE_WITH_JSON)
|
|
endif()
|
|
|
|
if(YAZE_ENABLE_AI)
|
|
add_compile_definitions(Z3ED_AI)
|
|
endif()
|
|
|
|
# Print configuration summary
|
|
message(STATUS "=== YAZE Build Configuration ===")
|
|
message(STATUS "GUI Application: ${YAZE_BUILD_GUI}")
|
|
message(STATUS "CLI Tools: ${YAZE_BUILD_CLI}")
|
|
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 "JSON Support: ${YAZE_ENABLE_JSON}")
|
|
message(STATUS "AI Features: ${YAZE_ENABLE_AI}")
|
|
message(STATUS "LTO: ${YAZE_ENABLE_LTO}")
|
|
message(STATUS "Sanitizers: ${YAZE_ENABLE_SANITIZERS}")
|
|
message(STATUS "Coverage: ${YAZE_ENABLE_COVERAGE}")
|
|
message(STATUS "=================================")
|
|
|