## New Modules - StorageModule: SQLite persistence for sessions, app usage, conversations - MonitoringModule: Cross-platform window tracking (Win32/X11) - AIModule: Multi-provider LLM integration with agentic tool loop - VoiceModule: TTS/STT coordination with speak queue ## Shared Libraries - AissiaLLM: ILLMProvider abstraction (Claude + OpenAI providers) - AissiaPlatform: IWindowTracker abstraction (Win32 + X11) - AissiaAudio: ITTSEngine (SAPI/espeak) + ISTTEngine (Whisper API) - HttpClient: Header-only HTTP client with OpenSSL ## Configuration - Added JSON configs for all modules (storage, monitoring, ai, voice) - Multi-provider LLM config with Claude and OpenAI support ## Dependencies - SQLite3, OpenSSL, cpp-httplib (FetchContent) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
227 lines
6.7 KiB
CMake
227 lines
6.7 KiB
CMake
cmake_minimum_required(VERSION 3.20)
|
|
project(Aissia VERSION 0.1.0 LANGUAGES CXX)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
# Export compile commands for IDE support
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
|
# ============================================================================
|
|
# GroveEngine Integration
|
|
# ============================================================================
|
|
set(GROVE_BUILD_TESTS OFF CACHE BOOL "Disable GroveEngine tests" FORCE)
|
|
add_subdirectory(external/GroveEngine)
|
|
|
|
# ============================================================================
|
|
# Dependencies
|
|
# ============================================================================
|
|
|
|
# SQLite3
|
|
find_package(SQLite3 REQUIRED)
|
|
|
|
# OpenSSL for HTTPS
|
|
find_package(OpenSSL REQUIRED)
|
|
|
|
# cpp-httplib (header-only HTTP client)
|
|
include(FetchContent)
|
|
FetchContent_Declare(
|
|
httplib
|
|
GIT_REPOSITORY https://github.com/yhirose/cpp-httplib.git
|
|
GIT_TAG v0.14.1
|
|
)
|
|
FetchContent_MakeAvailable(httplib)
|
|
|
|
# ============================================================================
|
|
# Main Executable
|
|
# ============================================================================
|
|
add_executable(aissia
|
|
src/main.cpp
|
|
)
|
|
|
|
target_link_libraries(aissia PRIVATE
|
|
GroveEngine::impl
|
|
spdlog::spdlog
|
|
)
|
|
|
|
target_include_directories(aissia PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src
|
|
)
|
|
|
|
# ============================================================================
|
|
# Hot-Reloadable Modules (.so)
|
|
# ============================================================================
|
|
|
|
# SchedulerModule - Gestion du temps et détection hyperfocus
|
|
add_library(SchedulerModule SHARED
|
|
src/modules/SchedulerModule.cpp
|
|
)
|
|
target_link_libraries(SchedulerModule PRIVATE
|
|
GroveEngine::impl
|
|
spdlog::spdlog
|
|
)
|
|
set_target_properties(SchedulerModule PROPERTIES
|
|
PREFIX "lib"
|
|
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/modules
|
|
)
|
|
|
|
# NotificationModule - Alertes système et TTS
|
|
add_library(NotificationModule SHARED
|
|
src/modules/NotificationModule.cpp
|
|
)
|
|
target_link_libraries(NotificationModule PRIVATE
|
|
GroveEngine::impl
|
|
spdlog::spdlog
|
|
)
|
|
set_target_properties(NotificationModule PROPERTIES
|
|
PREFIX "lib"
|
|
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/modules
|
|
)
|
|
|
|
# ============================================================================
|
|
# Shared Libraries (linked into modules)
|
|
# ============================================================================
|
|
|
|
# LLM Providers Library
|
|
add_library(AissiaLLM STATIC
|
|
src/shared/llm/LLMProviderFactory.cpp
|
|
src/shared/llm/ClaudeProvider.cpp
|
|
src/shared/llm/OpenAIProvider.cpp
|
|
src/shared/llm/ToolRegistry.cpp
|
|
)
|
|
target_include_directories(AissiaLLM PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src
|
|
${httplib_SOURCE_DIR}
|
|
)
|
|
target_link_libraries(AissiaLLM PRIVATE
|
|
GroveEngine::impl
|
|
spdlog::spdlog
|
|
OpenSSL::SSL
|
|
OpenSSL::Crypto
|
|
)
|
|
target_compile_definitions(AissiaLLM PRIVATE CPPHTTPLIB_OPENSSL_SUPPORT)
|
|
|
|
# Platform Library (window tracking)
|
|
add_library(AissiaPlatform STATIC
|
|
src/shared/platform/WindowTrackerFactory.cpp
|
|
)
|
|
target_include_directories(AissiaPlatform PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src
|
|
)
|
|
target_link_libraries(AissiaPlatform PRIVATE
|
|
spdlog::spdlog
|
|
)
|
|
if(WIN32)
|
|
target_link_libraries(AissiaPlatform PRIVATE psapi)
|
|
endif()
|
|
|
|
# Audio Library (TTS/STT)
|
|
add_library(AissiaAudio STATIC
|
|
src/shared/audio/TTSEngineFactory.cpp
|
|
src/shared/audio/STTEngineFactory.cpp
|
|
)
|
|
target_include_directories(AissiaAudio PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src
|
|
${httplib_SOURCE_DIR}
|
|
)
|
|
target_link_libraries(AissiaAudio PRIVATE
|
|
spdlog::spdlog
|
|
OpenSSL::SSL
|
|
OpenSSL::Crypto
|
|
)
|
|
target_compile_definitions(AissiaAudio PRIVATE CPPHTTPLIB_OPENSSL_SUPPORT)
|
|
if(WIN32)
|
|
target_link_libraries(AissiaAudio PRIVATE sapi ole32)
|
|
endif()
|
|
|
|
# ============================================================================
|
|
# New Modules
|
|
# ============================================================================
|
|
|
|
# StorageModule - SQLite persistence
|
|
add_library(StorageModule SHARED
|
|
src/modules/StorageModule.cpp
|
|
)
|
|
target_include_directories(StorageModule PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
|
target_link_libraries(StorageModule PRIVATE
|
|
GroveEngine::impl
|
|
spdlog::spdlog
|
|
SQLite::SQLite3
|
|
)
|
|
set_target_properties(StorageModule PROPERTIES
|
|
PREFIX "lib"
|
|
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/modules
|
|
)
|
|
|
|
# MonitoringModule - Window tracking
|
|
add_library(MonitoringModule SHARED
|
|
src/modules/MonitoringModule.cpp
|
|
)
|
|
target_include_directories(MonitoringModule PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
|
target_link_libraries(MonitoringModule PRIVATE
|
|
GroveEngine::impl
|
|
spdlog::spdlog
|
|
AissiaPlatform
|
|
)
|
|
set_target_properties(MonitoringModule PROPERTIES
|
|
PREFIX "lib"
|
|
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/modules
|
|
)
|
|
|
|
# AIModule - LLM integration
|
|
add_library(AIModule SHARED
|
|
src/modules/AIModule.cpp
|
|
)
|
|
target_include_directories(AIModule PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
|
target_link_libraries(AIModule PRIVATE
|
|
GroveEngine::impl
|
|
spdlog::spdlog
|
|
AissiaLLM
|
|
)
|
|
set_target_properties(AIModule PROPERTIES
|
|
PREFIX "lib"
|
|
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/modules
|
|
)
|
|
|
|
# VoiceModule - TTS/STT
|
|
add_library(VoiceModule SHARED
|
|
src/modules/VoiceModule.cpp
|
|
)
|
|
target_include_directories(VoiceModule PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
|
target_link_libraries(VoiceModule PRIVATE
|
|
GroveEngine::impl
|
|
spdlog::spdlog
|
|
AissiaAudio
|
|
)
|
|
set_target_properties(VoiceModule PROPERTIES
|
|
PREFIX "lib"
|
|
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/modules
|
|
)
|
|
|
|
# ============================================================================
|
|
# Copy config files to build directory
|
|
# ============================================================================
|
|
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/config/
|
|
DESTINATION ${CMAKE_BINARY_DIR}/config)
|
|
|
|
# ============================================================================
|
|
# Development targets
|
|
# ============================================================================
|
|
|
|
# Quick rebuild of modules only (for hot-reload workflow)
|
|
add_custom_target(modules
|
|
DEPENDS SchedulerModule NotificationModule StorageModule MonitoringModule AIModule VoiceModule
|
|
COMMENT "Building hot-reloadable modules only"
|
|
)
|
|
|
|
# Create data directory
|
|
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/data)
|
|
|
|
# Run Aissia
|
|
add_custom_target(run
|
|
COMMAND $<TARGET_FILE:aissia>
|
|
DEPENDS aissia modules
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
|
COMMENT "Running Aissia"
|
|
)
|