Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/CMakeLists.txt
T
berrux-dev 040bdd558f Remove forward-declaration stub-header directories (.forward-declarations/, forward-declarations/)
Deletes the two stub-header trees (249 files) that shadowed the real
rtiddsgen-generated DDS headers, and removes every reference to them.

CMake (15 include-path entries):
  root CMakeLists.txt include_directories(.../forward-declarations);
  NGL_TARGET_INCLUDE_DIRECTORIES entries in 7 service CMakeLists
  (ServiceManagement, SoundManagement, SituationMap, ScreenRecording,
   SituationReplayManagement, SituationReplay, ServiceMonitor)

Source includes that resolved to the root-level stubs (only 2, repointed to the
module-prefixed generated headers the rest of the tree already uses):
  Lts/Services/AreaEffectSimulation/object_charge_effect.h
    <aes_dtc.h> -> <AreaEffectSimulation/aes_dtc.h>
  Lts/Proxies/TrainingAreaBaseOC/websocket_handler.h
    <taboc_dtc.h> -> <TrainingAreaBaseOC/taboc_dtc.h>
  (generic_dtc_impl.h needs no change: its quote-include "generic_dtc.h"
   resolves to the real Lts/DDS/DTC/generic_dtc.h in the same directory)

Tests:
  tests/test_migration_stubs.cpp: remove the redundant root-level stub test
    (AesDtcCompiles) - the module-prefixed AreaEffectSimulationDtcCompiles test
    already exercises the same AreaEffectSimulation::Interface header.
  tests/test_skl_dtc.cpp: delete (removed-module compile test, already filtered
    out of the build) and remove its now-obsolete CMake list(FILTER) exclusion.

Validation: full rebuild (build4, make -j4 -k) with the removal - 0 new compile
errors vs the pre-existing base-state baseline (77 unique real-error signatures
identical to baseline; all 15 'No such file' headers pre-existing).
2026-10-03 18:12:44 +02:00

256 lines
5.9 KiB
CMake
Executable File

#
# $Id$
# $HeadURL$
# $Author$
#
INCLUDE(MacroRTIDDSGen)
INCLUDE(MacroCodeGenIdl)
SET(xml_FILE srp_service.xml)
#
# --- Library svcSrpCommon --------------------------------------------------------------------------------
#
SET(SRCS_common
srp_export.h
logger.cpp
logger.h
)
# Generate srp_enums.idl / srp.idl
IF(BUILD_RTI)
CODEGEN_IDL_SVC(SRCS_common ${xml_FILE})
ENDIF()
# The enums stub copy below would overwrite the rtiddsgen-generated
# <svc>_enums.hpp (RTIDDSGEN on <svc>_enums.idl writes the same build-dir
# path) on every cmake re-configure. Only keep it for BUILD_RTI=OFF.
IF(NOT BUILD_RTI)
# Stub file for compilation (fallback when no IDL exists)
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/include/SituationReplay/srp_enums.hpp.stub
${CMAKE_BINARY_DIR}/Lts/Services/SituationReplay/srp_enums.hpp
COPYONLY
)
ENDIF()
# Generate srp_db_impl.cpp/.h, srp_db.h
IF(BUILD_RTI)
CODEGEN_DATABASE(SRCS_common ${xml_FILE})
ENDIF()
# The enums stub copy below would overwrite the rtiddsgen-generated
# <svc>_enums.hpp (RTIDDSGEN on <svc>_enums.idl writes the same build-dir
# path) on every cmake re-configure. Only keep it for BUILD_RTI=OFF.
IF(NOT BUILD_RTI)
# Copy srp_enums.hpp.stub to build directory for compilation
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/include/SituationReplay/srp_enums.hpp.stub
${CMAKE_BINARY_DIR}/Lts/Services/SituationReplay/srp_enums.hpp
COPYONLY
)
ENDIF()
# Generate *.cpp/*.hpp from idl
IF(BUILD_RTI)
RTIDDSGEN(SRCS_common srp_enums.idl)
RTIDDSGEN(SRCS_common srp.idl)
ENDIF()
# The enums stub copy below would overwrite the rtiddsgen-generated
# <svc>_enums.hpp (RTIDDSGEN on <svc>_enums.idl writes the same build-dir
# path) on every cmake re-configure. Only keep it for BUILD_RTI=OFF.
IF(NOT BUILD_RTI)
# Copy srp_enums.hpp.stub to build directory for compilation
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/include/SituationReplay/srp_enums.hpp.stub
${CMAKE_BINARY_DIR}/Lts/Services/SituationReplay/srp_enums.hpp
COPYONLY
)
ENDIF()
# Generate srp_dt[s,c]_types.h, srp_ft[s,c]_types.h
IF(BUILD_RTI)
CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
ENDIF()
# generate srp_[d|f]tc.h
IF(BUILD_RTI)
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
ENDIF()
# SV needed for topic type plugin
NGL_ADD_LIBRARY(WS AAR SV svcSrpCommon SHARED ${SRCS_common})
NGL_TARGET_INCLUDE_DIRECTORIES(svcSrpCommon
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
${CMAKE_CURRENT_BINARY_DIR}/../
)
NGL_TARGET_LINK_LIBRARIES(svcSrpCommon
PRIVATE
RTI::nddscpp2
PUBLIC
Qt6::Core
ngldb
$<IF:$<TARGET_EXISTS:ddscore>,ddscore,>
NGLLogger
)
NGL_INSTALL_TARGET(svcSrpCommon)
#
# --- Library svcSrpClient --------------------------------------------------------------------------------
#
SET(SRCS_client
srp_export.h
)
# generate srp_ftc_impl.[cpp|h]
IF(BUILD_RTI)
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
ENDIF()
NGL_ADD_LIBRARY(WS svcSrpClient SHARED ${SRCS_client})
NGL_TARGET_INCLUDE_DIRECTORIES(svcSrpClient
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
${CMAKE_CURRENT_BINARY_DIR}/../
)
NGL_TARGET_LINK_LIBRARIES(svcSrpClient
PRIVATE
RTI::nddscpp2
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
PUBLIC
svcSrpCommon
ddsftc
)
NGL_INSTALL_TARGET(svcSrpClient)
#
# --- Library svcSrpServer --------------------------------------------------------------------------------
#
SET(SRCS_server
srp_export.h
)
# generate srp_[d|f]ts.h, srp_[d|f]ts_impl.[cpp|h]
IF(BUILD_RTI)
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
ENDIF()
NGL_ADD_LIBRARY(AAR SV WS svcSrpServer SHARED ${SRCS_server})
NGL_TARGET_INCLUDE_DIRECTORIES(svcSrpServer
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
${CMAKE_CURRENT_BINARY_DIR}/../
)
NGL_TARGET_LINK_LIBRARIES(svcSrpServer
PRIVATE
RTI::nddscpp2
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
ddsfts
PUBLIC
svcSrpCommon
ngldb
)
NGL_INSTALL_TARGET(svcSrpServer)
#
# --- Topic Type Plugin --------------------------------------------------------------
#
IF(BUILD_RTI)
CREATE_TOPIC_TYPE_PLUGIN(${xml_FILE})
ENDIF()
#
# --- Executable svcSituationReplay (sSrp) -------------------------------------------------
#
SET(SRCS_exe
db_reader.cpp
db_reader.h
dds_handler.cpp
dds_handler.h
handler_situation_replay.cpp
handler_situation_replay.h
main.cpp
main_handler.cpp
main_handler.h
object_situation_replay.cpp
object_situation_replay.h
settings.cpp
settings.h
${xml_FILE}
)
# Generate srp.sql, srp.xml
IF(BUILD_RTI)
CODEGEN_SQL(SRCS_exe ${xml_FILE})
ENDIF()
NGL_ADD_SVC_ICON(SRCS_exe)
NGL_ADD_EXECUTABLE(WS AAR SV svcSituationReplay ${SRCS_exe})
NGL_TARGET_LINK_LIBRARIES(svcSituationReplay
rscCommon
Qt6::Core
svcCoreClient
svcSrpCommon
svcSrpServer
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
nglsettings
ProjectConfig
LtsCommandLineParser
NGLLogger
nglcoreapplication
LtsPluginLoader
ngltools
)
NGL_INSTALL_TARGET(svcSituationReplay)
NGL_INSTALL(WS FILES log4cxx_srp.props DESTINATION bin)
# svcSituationReplaySqlite
SET(SRCS_sqlite
db_reader.cpp
db_reader.h
dds_handler.cpp
dds_handler.h
handler_situation_replay_sqlite.cpp
handler_situation_replay_sqlite.h
main_handler_sqlite.cpp
main_handler_sqlite.h
object_situation_replay.cpp
object_situation_replay.h
static_publisher.cpp
static_publisher.h
${xml_FILE}
)
NGL_ADD_LIBRARY2(WS SituationReplaySqlite SHARED ${SRCS_sqlite})
NGL_TARGET_INCLUDE_DIRECTORIES(SituationReplaySqlite
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/..
${CMAKE_CURRENT_BINARY_DIR}/..
)
NGL_TARGET_LINK_LIBRARIES(SituationReplaySqlite
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
LtsPluginLoader
LtsScriptTimeline
NGLLogger
ngltools
Qt6::Core
Qt6::Sql
rscCommon
svcCoreClient
svcSrpCommon
svcSrpServer
svcAsmServer
svcExmServer
svcFlmServer
$<IF:$<TARGET_EXISTS:svcIsmServer>,svcIsmServer,>
svcPdmServer
svcPpmServer
)
# Uncomment if necessary
#ADD_SUBDIRECTORY(UnitTests)
ADD_SUBDIRECTORY(ModuleTests)