Files
Ange-Marie MAURIN - A2M Systèmes da0d31385b build: arborescence bin/<plateforme>/<type> et build unifié (ADR 0010)
- platform/layout : racine sequa-root.json, chemins des composants, arguments et chemins en UTF-8.
- Règles install() : bin/windows-x64/{debug,release,asan}/ (core, render, studio + ui, engines).
- Le Core trouve sequa-render et les adaptateurs depuis la racine (--sequa-root, passé par
  Studio host à sa copie fantôme) : plus de render-unavailable depuis le panneau Rendu.
- L'adaptateur Godot cherche Godot et son projet à côté de lui (surcharge par --adapter-options) ;
  template_release pour le type release. Godot hébergé dans les presets debug et release.
- scripts/build-all.ps1 : Godot, C++, interface, arrêt des processus du dossier visé, install ;
  check.ps1 l'appelle (modification de l'ADR 0004).
- docs/installation/ : compiler, lancer, installer et désinstaller par plateforme.
2026-11-07 15:50:37 +01:00

88 lines
3.8 KiB
CMake

# SPDX-License-Identifier: MPL-2.0
configure_file(src/version_config.hpp.in "${CMAKE_CURRENT_BINARY_DIR}/generated/sequa/core/version_config.hpp" @ONLY)
# --- sequa::core : simulation, rejeu (aucune dépendance réseau) -------------------------
add_library(sequa_core
src/version.cpp
src/sim/simulation.cpp
src/sim/replay.cpp)
add_library(sequa::core ALIAS sequa_core)
target_include_directories(sequa_core
PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}/include"
PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/src"
"${CMAKE_CURRENT_BINARY_DIR}/generated")
target_compile_features(sequa_core PUBLIC cxx_std_20)
sequa_target_defaults(sequa_core)
# --- sequa::core_render : projection du monde simulé vers la scène SEQUA 3D --------------
add_library(sequa_core_render src/render/scene_projection.cpp)
add_library(sequa::core_render ALIAS sequa_core_render)
target_link_libraries(sequa_core_render PUBLIC sequa::core sequa::3d)
sequa_target_defaults(sequa_core_render)
# --- sequa::core_server : protocole Studio - Core et serveur WebSocket ------------------
if(SEQUA_BUILD_SERVER)
add_library(sequa_core_server
src/server/base64.cpp
src/server/live_session.cpp
src/server/protocol.cpp
src/server/render_hub.cpp
src/server/render_supervisor.cpp
src/server/runtime.cpp
src/server/server.cpp)
target_include_directories(sequa_core_server PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/server")
add_library(sequa::core_server ALIAS sequa_core_server)
target_link_libraries(sequa_core_server
PUBLIC sequa::core sequa::3d
PRIVATE sequa::core_render sequa::3d_wire sequa::process sequa::layout nlohmann_json::nlohmann_json ixwebsocket::ixwebsocket)
if(WIN32)
target_link_libraries(sequa_core_server PRIVATE ws2_32) # vérification exclusive du port
endif()
sequa_target_defaults(sequa_core_server)
add_executable(sequa_core_app app/main.cpp)
set_target_properties(sequa_core_app PROPERTIES OUTPUT_NAME sequa-core)
# L'application utilise le superviseur du rendu, interne à sequa_core_server.
target_include_directories(sequa_core_app PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/server")
target_link_libraries(sequa_core_app PRIVATE sequa::core_server sequa::core_render sequa::process sequa::layout)
sequa_target_defaults(sequa_core_app)
sequa_install_executable(sequa_core_app core)
endif()
# --- Tests ------------------------------------------------------------------------------
if(SEQUA_BUILD_TESTS)
set(_sequa_core_test_sources
tests/main.cpp
tests/test_version.cpp
tests/sim/test_fixed.cpp
tests/sim/test_rng.cpp
tests/sim/test_clock.cpp
tests/sim/test_simulation.cpp
tests/sim/test_replay.cpp
tests/render/test_scene_projection.cpp)
if(SEQUA_BUILD_SERVER)
list(APPEND _sequa_core_test_sources
tests/server/test_base64.cpp
tests/server/test_live_session.cpp
tests/server/test_protocol.cpp
tests/server/test_render_channel.cpp
tests/server/test_runtime.cpp
tests/server/test_server.cpp)
endif()
add_executable(sequa_core_tests ${_sequa_core_test_sources})
target_link_libraries(sequa_core_tests PRIVATE sequa::core sequa::core_render doctest::doctest)
if(SEQUA_BUILD_SERVER)
target_link_libraries(sequa_core_tests PRIVATE
sequa::core_server sequa::3d_wire nlohmann_json::nlohmann_json ixwebsocket::ixwebsocket)
# base64 est interne à sequa_core_server : testé directement.
target_include_directories(sequa_core_tests PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/server")
endif()
sequa_target_defaults(sequa_core_tests)
doctest_discover_tests(sequa_core_tests)
endif()