# Velox Download Manager — top-level build
# SCAFFOLDING ONLY. Lane PKG/QA owns this file; each add_subdirectory() is enabled by the
# owning lane when it lands its first target. Nothing here builds yet by design.

cmake_minimum_required(VERSION 3.28)

project(velox
    VERSION 0.1.0
    DESCRIPTION "IDM-class download manager for Linux"
    LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

option(VELOX_BUILD_GUI      "Build the Qt 6 GUI client"   ON)
option(VELOX_BUILD_TESTS    "Build unit and integration tests" ON)
option(VELOX_BUILD_FUZZ     "Build libFuzzer targets (clang only)" OFF)
option(VELOX_ENABLE_MEDIA   "Build the HLS/DASH media grabber (M4)" OFF)

add_compile_options(-Wall -Wextra -Wpedantic)
if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
    add_compile_options(-Werror)
endif()

# --- Dependencies (see README bootstrap; none are vendored) --------------------
# find_package(CURL 8.0 REQUIRED)
# find_package(SQLite3 REQUIRED)
# find_package(nlohmann_json 3.11 REQUIRED)
# find_package(OpenSSL REQUIRED)
# if(VELOX_BUILD_GUI)
#   find_package(Qt6 6.6 REQUIRED COMPONENTS Widgets Svg Network LinguistTools)
#   qt_standard_project_setup()
# endif()

# --- Targets: each lane enables its own line ----------------------------------
# add_subdirectory(core)      # lane CORE   → libveloxcore
# add_subdirectory(daemon)    # lane DAEMON → veloxd
# add_subdirectory(cli)       # lane DAEMON → velox
# add_subdirectory(nmhost)    # lane DAEMON → velox-nmhost
# if(VELOX_BUILD_GUI)
#   add_subdirectory(gui)     # lane GUI    → velox-gui
# endif()
# if(VELOX_BUILD_TESTS)
#   enable_testing()
#   add_subdirectory(tests)
# endif()
