Files
qt-migration-legatus/qt5-before/dlbo/Lts/Services/ParticipantManagement/CMakeLists.txt
T
torstenandCopilot 7173785915 Qt6 Migration: Complete migration with DDS/RTI support and build validation
Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list

Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF

Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
  - Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
  - Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)

Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified

Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-15 18:20:26 +00:00

303 lines
7.5 KiB
CMake

#
# $Id$
# $HeadURL$
# $Author$
#
INCLUDE(MacroRTIDDSGen)
INCLUDE(MacroCodeGenIdl)
SET(xml_FILE ppm_service.xml)
#
# --- Library svcPpmCommon --------------------------------------------------------------------------------
#
SET(SRCS_common
ppm_export.h
ppm_common.cpp
ppm_common.h
ppm_db_impl_custom.cpp
ppm_db_impl_custom.h
logger.cpp
logger.h
)
# Generate ppm_enums.idl / ppm.idl
CODEGEN_IDL_SVC(SRCS_common ${xml_FILE})
# Generate ppm_db_structs.cpp/.h
CODEGEN_DATABASE_STRUCTS(SRCS_common ${xml_FILE})
# Generate ppm_db.cpp, ppm_db_impl.cpp/.h
CODEGEN_DATABASE_SQL(SRCS_common ${xml_FILE})
# Generate *.cpp/*.hpp from idl
RTIDDSGEN(SRCS_common ppm_enums.idl)
RTIDDSGEN(SRCS_common ppm.idl)
# Generate ppm_dt[s,c]_types.h, ppm_ft[s,c]_types.h
CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
# generate ppm_[d|f]tc.h
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
NGL_ADD_LIBRARY(AAR SV WS HLA svcPpmCommon SHARED ${SRCS_common})
NGL_TARGET_INCLUDE_DIRECTORIES(svcPpmCommon
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
${CMAKE_CURRENT_BINARY_DIR}/../
)
NGL_TARGET_LINK_LIBRARIES(svcPpmCommon
PRIVATE
RTI::nddscpp2
LtsUtilsCore
PUBLIC
Qt5::Core
Qt5::Gui
ddscore
NGLLogger
svcPdmCommon
LtsUtilsCore
LtsCoordTrans
ngldb
)
NGL_INSTALL_TARGET(svcPpmCommon)
#
# --- Library svcPpmClient --------------------------------------------------------------------------------
#
SET(SRCS_client
ppm_export.h
ppm_dtc_impl_custom.cpp
ppm_dtc_impl_custom.h
)
# generate ppm_[d|f]tc_impl.[cpp|h]
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
NGL_ADD_LIBRARY(WS AAR SV HLA svcPpmClient SHARED ${SRCS_client})
NGL_TARGET_INCLUDE_DIRECTORIES(svcPpmClient
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
${CMAKE_CURRENT_BINARY_DIR}/../
)
NGL_TARGET_LINK_LIBRARIES(svcPpmClient
PRIVATE
RTI::nddscpp2
ddsconnector
PUBLIC
svcPpmCommon
ddsftc
)
NGL_INSTALL_TARGET(svcPpmClient)
#
# --- Library svcPpmServer --------------------------------------------------------------------------------
#
SET(SRCS_server
ppm_export.h
convert_db_to_dds.h
)
# generate ppm_[d|f]ts.h, ppm_[d|f]ts_impl.[cpp|h]
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
# WS for RecordReplayPlugin
NGL_ADD_LIBRARY(AAR SV WS svcPpmServer SHARED ${SRCS_server})
NGL_TARGET_INCLUDE_DIRECTORIES(svcPpmServer
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
${CMAKE_CURRENT_BINARY_DIR}/../
)
NGL_TARGET_LINK_LIBRARIES(svcPpmServer
PRIVATE
RTI::nddscpp2
ddsconnector
ddsfts
PUBLIC
svcPpmCommon
ngldb
LtsUtilsCore
)
NGL_INSTALL_TARGET(svcPpmServer)
#
# --- Topic Type Plugin --------------------------------------------------------------
#
CREATE_TOPIC_TYPE_PLUGIN(${xml_FILE})
#
# --- RecordReplayPlugin --------------------------------------------------------------
#
CREATE_RECORD_REPLAY_PLUGIN_SHARED(${xml_FILE})
IF (TARGET ppmRecordReplayPlugin)
TARGET_SOURCES(ppmRecordReplayPlugin
PRIVATE
RecordReplay/participant_for_replay.h
RecordReplay/participant_handler_for_replay.cpp
RecordReplay/participant_handler_for_replay.h
RecordReplay/ppm_record_replay_plugin_custom.cpp
RecordReplay/ppm_record_replay_plugin_custom.h
ParticipantHandling/participant_donator.h
ParticipantHandling/participant.cpp
ParticipantHandling/participant.h
ParticipantHandling/participant_handler.cpp
ParticipantHandling/participant_handler.h
ParticipantHandling/unit_position_calculator.cpp
ParticipantHandling/unit_position_calculator.h
settings.cpp
settings.h
web_socket_handler.cpp
web_socket_handler.h
)
TARGET_LINK_LIBRARIES(ppmRecordReplayPlugin
Qt5::Concurrent
Qt5::WebSockets
tabRecordReplayPlugin
svcBldClient
svcPpmServer
svcPdmClient
LtsCoordTrans
LtsUtilsCoreHeaderOnly # unit_position_calculator.cpp => LtsUtilsCore/qpoint3d.h
nglsettings
ngltools
)
ENDIF()
#
# --- Executable svcParticipantManagement (sPPM) -------------------------------------------------
#
LIST(APPEND SRCS_exe
BiteHandling/bite_handler.cpp
BiteHandling/bite_handler.h
dds_handler.cpp
dds_handler.h
EquipmentEventHandling/equipment_event_handler.cpp
EquipmentEventHandling/equipment_event_handler.h
exercise_time.cpp
exercise_time.h
main.cpp
main_handler.cpp
main_handler.h
ParticipantHandling/firing_unit_validator.cpp
ParticipantHandling/firing_unit_validator.h
ParticipantHandling/get_participants.cpp
ParticipantHandling/get_participants.h
ParticipantHandling/participant_donator.h
ParticipantHandling/participant.cpp
ParticipantHandling/participant.h
ParticipantHandling/participant_for_exercise.cpp
ParticipantHandling/participant_for_exercise.h
ParticipantHandling/participant_handler.cpp
ParticipantHandling/participant_handler.h
ParticipantHandling/participant_handler_for_exercise.cpp
ParticipantHandling/participant_handler_for_exercise.h
ParticipantHandling/proxy_listener.cpp
ParticipantHandling/proxy_listener.h
ParticipantHandling/unit_position_calculator.cpp
ParticipantHandling/unit_position_calculator.h
PartyHandling/party.cpp
PartyHandling/party_donator.h
PartyHandling/party.h
PartyHandling/party_handler.cpp
PartyHandling/party_handler.h
settings.cpp
settings.h
TargetHandling/object_target_information.cpp
TargetHandling/object_target_information.h
TargetHandling/handler_target_information.cpp
TargetHandling/handler_target_information.h
TemplateHandling/template.cpp
TemplateHandling/template.h
TemplateHandling/template_handler.cpp
TemplateHandling/template_handler.h
TypeHandling/type_donator.h
TypeHandling/type_handler.cpp
TypeHandling/type_handler_exercise.cpp
TypeHandling/type_handler_exercise.h
TypeHandling/type_handler_global.cpp
TypeHandling/type_handler_global.h
TypeHandling/type_handler.h
UasHandling/uas.cpp
UasHandling/uas.h
UasHandling/uas_handler.cpp
UasHandling/uas_handler.h
UasHandling/mission_plan_handler.h
UasHandling/mission_plan_handler.cpp
UasHandling/object_mission_plan.cpp
UasHandling/object_mission_plan.h
WebSocketInterface/data_manager.cpp
WebSocketInterface/data_manager.h
WebSocketInterface/json_keys.h
WebSocketInterface/websocket_interface_handler.cpp
WebSocketInterface/websocket_interface_handler.h
WebSocketInterface/Messages/client_message.cpp
WebSocketInterface/Messages/client_message.h
WebSocketInterface/Messages/reply_message.cpp
WebSocketInterface/Messages/reply_message.h
web_socket_handler.cpp
web_socket_handler.h
${xml_FILE}
)
# Generate ppm.sql, ppm.xml
CODEGEN_SQL(SRCS_exe ${xml_FILE})
NGL_ADD_SVC_ICON(SRCS_exe)
NGL_ADD_EXECUTABLE(AAR SV svcParticipantManagement ${SRCS_exe})
NGL_TARGET_LINK_LIBRARIES(svcParticipantManagement
ppmRecordReplayPlugin
Qt5::Core
Qt5::Concurrent
Qt5::WebSockets
ddsconnector
LtsCommandLineParser
nglsettings
nglcoreapplication
NGLLogger
ProjectConfig
svcCoreClient
svcPdmClient
svcPpmCommon
svcPpmServer
svcPpmClient
svcTabClient
svcAesClient
svcCesServer
svcCesClient
svcBldClient
svcTabServer
svcExmClient
ngltools
LtsCoordTrans
LtsWebSocketServer
)
NGL_INSTALL_TARGET(svcParticipantManagement)
NGL_INSTALL(AAR SV FILES log4cxx_ppm.props DESTINATION bin)
NGL_ADD_TARGET_LINK(svcParticipantManagement sPPM)
# copy ppm_predefined_data.sql to share
SET(in_file_sql "ppm_predefined_data.sql")
NGL_INSTALL(AAR SV FILES ppm_predefined_data.sql DESTINATION share/Lts/sql)
# Uncomment if necessary
#ADD_SUBDIRECTORY(UnitTests)
ADD_SUBDIRECTORY(ModuleTests)