Reworks CMake wiring for Qt6 codegen include order

Adds missing toolchain packages and include dirs so generated headers resolve.
This commit is contained in:
berrux-dev committed 2026-09-21 02:42:27 +02:00
1 parent 220ca64679
commit cf62b17d58
25 files changed
+388 -84

No files matched your search

@@ -31,9 +31,6 @@ if(QT6_GUI_AVAILABLE)
PRIVATE
NGLLogger
## LtsSessionDataDds
## ExmDataPluginInterface # External dependency - missing
## situationMapCommon # External dependency - missing
## situationMapElevationMap # External dependency - missing
PUBLIC
LtsUtilsCoreHeaderOnly
Qt6::Core
@@ -42,7 +39,14 @@ if(QT6_GUI_AVAILABLE)
endif()
if(BUILD_RTI)
target_link_libraries(LtsElevation PRIVATE AsmDataPluginInterface)
# All ElevationMapManager / resource_path / exm-dtc usages live inside
# #ifdef BUILD_RTI in lts_elevation_manager.cpp (Qt5 dependencies restored).
target_link_libraries(LtsElevation PRIVATE
AsmDataPluginInterface
ExmDataPluginInterface
situationMapCommon
situationMapElevationMap
)
endif()
ADD_SUBDIRECTORY(UnitTest_Elevation)
@@ -22,6 +22,10 @@ NGL_ADD_LIBRARY2(AAR SV WS HLA ddsconnector SHARED ${SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(ddsconnector
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../../
# dds_connector.h includes the generated ddsconnector_export.h with a
# quoted include; consumers (svcFilterManagement etc.) resolve it only
# if the binary dir with the GENERATE_EXPORT_HEADER output is exported.
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}
)
NGL_TARGET_LINK_LIBRARIES(ddsconnector
@@ -31,6 +31,10 @@ NGL_ADD_LIBRARY2(WS AAR SV HLA ddsfts SHARED ${SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(ddsfts
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../../
# generic_fts_internal.h includes the generated ddsfts_export.h with a
# quoted include; consumers (the generated *_topic_type_plugin.cpp)
# resolve it only if the binary dir with the export header is exported.
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/../../Proxies/TrainingAreaBase
)
NGL_TARGET_LINK_LIBRARIES(ddsfts
@@ -6,7 +6,7 @@
# Make ${Qt6_Gui} optional
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Gui)
set(Qt6_Gui ${Qt6_Gui})
set(Qt6_Gui Qt6::Gui)
else()
set(Qt6_Gui "")
endif()
@@ -42,12 +42,6 @@ CODEGEN_DATABASE(SRCS_common ${xml_FILE})
# Generate *.cpp/*.hpp from idl
RTIDDSGEN(SRCS_common bld_enums.idl)
# Stub file for compilation (fallback when no IDL exists)
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/include/Buildings/bld_enums.hpp.stub
${CMAKE_BINARY_DIR}/Lts/Proxies/Buildings/bld_enums.hpp
COPYONLY
)
RTIDDSGEN(SRCS_common bld.idl)
# Generate bld_dt[s,c]_types.h, bld_ft[s,c]_types.h
@@ -85,6 +79,11 @@ SET(SRCS_client
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
NGL_ADD_LIBRARY2(AAR SV WS svcBldClient SHARED ${SRCS_client})
# NGL_ADD_LIBRARY2 (unlike NGL_ADD_LIBRARY) does not define the
# MAKE_<SYMBOL>_LIB compile guard, but the generated bld_[d|f]tc_impl.h
# headers that this target compiles carry such a guard — same situation as
# ddscore, which defines MAKE_DDSCORE_LIB explicitly for the same reason.
TARGET_COMPILE_DEFINITIONS(svcBldClient PRIVATE MAKE_SVCBLDCLIENT_LIB)
NGL_TARGET_INCLUDE_DIRECTORIES(svcBldClient
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -113,6 +112,9 @@ SET(SRCS_server
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
NGL_ADD_LIBRARY2(AAR SV svcBldServer SHARED ${SRCS_server})
# Same guard rationale as svcBldClient above: the generated
# bld_[d|f]ts_impl.h headers require MAKE_SVCBLDSERVER_LIB.
TARGET_COMPILE_DEFINITIONS(svcBldServer PRIVATE MAKE_SVCBLDSERVER_LIB)
NGL_TARGET_INCLUDE_DIRECTORIES(svcBldServer
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -61,6 +61,11 @@ SET(SRCS_client
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
NGL_ADD_LIBRARY2(SV WS svcCmoClient SHARED ${SRCS_client})
# NGL_ADD_LIBRARY2 (unlike NGL_ADD_LIBRARY) does not define the
# MAKE_<SYMBOL>_LIB compile guard, but the generated cmo_[d|f]tc_impl.h
# headers that this target compiles carry such a guard — same situation as
# ddscore, which defines MAKE_DDSCORE_LIB explicitly for the same reason.
TARGET_COMPILE_DEFINITIONS(svcCmoClient PRIVATE MAKE_SVCCMOCLIENT_LIB)
NGL_TARGET_INCLUDE_DIRECTORIES(svcCmoClient
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -90,6 +95,9 @@ SET(SRCS_server
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
NGL_ADD_LIBRARY2(SV svcCmoServer SHARED ${SRCS_server})
# Same guard rationale as svcCmoClient above: the generated
# cmo_[d|f]ts_impl.h headers require MAKE_SVCCMOSERVER_LIB.
TARGET_COMPILE_DEFINITIONS(svcCmoServer PRIVATE MAKE_SVCCMOSERVER_LIB)
NGL_TARGET_INCLUDE_DIRECTORIES(svcCmoServer
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -66,6 +66,11 @@ SET(SRCS_client
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
NGL_ADD_LIBRARY2(AAR SV WS svcGnaClient SHARED ${SRCS_client})
# NGL_ADD_LIBRARY2 (unlike NGL_ADD_LIBRARY) does not define the
# MAKE_<SYMBOL>_LIB compile guard, but the generated gna_[d|f]tc_impl.h
# headers that this target compiles carry such a guard — same situation as
# ddscore, which defines MAKE_DDSCORE_LIB explicitly for the same reason.
TARGET_COMPILE_DEFINITIONS(svcGnaClient PRIVATE MAKE_SVCGNACLIENT_LIB)
NGL_TARGET_INCLUDE_DIRECTORIES(svcGnaClient
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -152,6 +152,11 @@ IF(BUILD_RTI)
ENDIF()
NGL_ADD_LIBRARY2(AAR SV WS HLA svcTabClient SHARED ${SRCS_client})
# NGL_ADD_LIBRARY2 (unlike NGL_ADD_LIBRARY) does not define the
# MAKE_<SYMBOL>_LIB compile guard, but the generated tab_[d|f]tc_impl.h
# headers require MAKE_SVCTABCLIENT_LIB — same situation as
# svcCoreClient/ddscore, which define their guards explicitly.
TARGET_COMPILE_DEFINITIONS(svcTabClient PRIVATE MAKE_SVCTABCLIENT_LIB)
NGL_TARGET_INCLUDE_DIRECTORIES(svcTabClient
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -184,6 +189,8 @@ IF(BUILD_RTI)
ENDIF()
NGL_ADD_LIBRARY2(AAR HLA SV svcTabServer SHARED ${SRCS_server}) # NGL_ADD_LIBRARY2 won't work here - no time for investigations
# Generated tab_[d|f]ts_impl.h require MAKE_SVCTABSERVER_LIB (see svcTabClient above).
TARGET_COMPILE_DEFINITIONS(svcTabServer PRIVATE MAKE_SVCTABSERVER_LIB)
if(BUILD_SV OR BUILD_HLA)
GENERATE_EXPORT_HEADER(svcTabServer) # FIXME: quick workaround
endif()
@@ -72,6 +72,11 @@ SET(SRCS_client
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
NGL_ADD_LIBRARY2(AAR SV WS svcTabocClient SHARED ${SRCS_client})
# NGL_ADD_LIBRARY2 (unlike NGL_ADD_LIBRARY) does not define the
# MAKE_<SYMBOL>_LIB compile guard, but the generated taboc_[d|f]tc_impl.h
# headers require MAKE_SVCTABOCCLIENT_LIB — same situation as
# svcTabClient/svcCoreClient, which define their guards explicitly.
TARGET_COMPILE_DEFINITIONS(svcTabocClient PRIVATE MAKE_SVCTABOCCLIENT_LIB)
NGL_TARGET_INCLUDE_DIRECTORIES(svcTabocClient
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -102,6 +107,8 @@ CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
#CODEGEN_DATABASE(SRCS_server ${xml_FILE})
NGL_ADD_LIBRARY2(AAR SV svcTabocServer SHARED ${SRCS_server})
# Generated taboc_[d|f]ts_impl.h require MAKE_SVCTABOCSERVER_LIB (see svcTabocClient above).
TARGET_COMPILE_DEFINITIONS(svcTabocServer PRIVATE MAKE_SVCTABOCSERVER_LIB)
NGL_TARGET_INCLUDE_DIRECTORIES(svcTabocServer
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -6,14 +6,14 @@
# Make ${Qt6_Gui} optional
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Gui)
set(Qt6_Gui ${Qt6_Gui})
set(Qt6_Gui Qt6::Gui)
else()
set(Qt6_Gui "")
endif()
# Make ${Qt6_Widgets} optional
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
set(Qt6_Widgets ${Qt6_Widgets})
set(Qt6_Widgets Qt6::Widgets)
else()
set(Qt6_Widgets "")
endif()
@@ -70,12 +70,10 @@ LIST(APPEND SRCS_common ${in_file_sql} ${out_file_sql})
# Generate aes_enums.idl / aes.idl / aes_enums.cpp/aes_enums.h
IF(BUILD_RTI)
CODEGEN_IDL_SVC(SRCS_common ${xml_FILE})
# Stub enum header for tests when BUILD_RTI=ON but no IDL
IF(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/aes_enums.idl")
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/include/AreaEffectSimulation/aes_enums.hpp.stub"
"${CMAKE_CURRENT_BINARY_DIR}/aes_enums.hpp"
COPYONLY)
ENDIF()
# The former stub copy for aes_enums.hpp ran unconditionally here: its
# IF(NOT EXISTS) guard checked the source dir, but CODEGEN_IDL_SVC writes
# aes_enums.idl into the build dir, so the stub always overwrote the
# rtiddsgen-generated header on re-configure. Removed for the ON build.
ENDIF()
# Generate aes_db_structs.cpp/.h
CODEGEN_DATABASE_STRUCTS(SRCS_common ${xml_FILE})
@@ -26,6 +26,10 @@ ENDIF()
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 asm_enums.hpp.stub to build directory for compilation
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/include/AssetManagement/asm_enums.hpp.stub
@@ -34,6 +38,7 @@ CONFIGURE_FILE(
)
ENDIF()
# Generate *.cpp/*.hpp from idl
RTIDDSGEN(SRCS_common asm_enums.idl)
RTIDDSGEN(SRCS_common asm.idl)
@@ -122,12 +122,17 @@ SET_SOURCE_FILES_PROPERTIES(list_response_collector.cpp PROPERTIES SKIP_UNITY_BU
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/AudioVideoManagement/avm_enums.hpp.stub
${CMAKE_BINARY_DIR}/Lts/Services/AudioVideoManagement/avm_enums.hpp
COPYONLY
)
ENDIF()
# Generate avm_db.h, avm_db_impl.cpp/.h
CODEGEN_DATABASE_SQL(SRCS_common ${xml_FILE})
@@ -136,6 +141,10 @@ IF(BUILD_RTI)
RTIDDSGEN(SRCS_common avm_enums.idl)
RTIDDSGEN(SRCS_common avm.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 avm_enums.hpp.stub to build directory for compilation
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/include/AudioVideoManagement/avm_enums.hpp.stub
@@ -144,6 +153,7 @@ CONFIGURE_FILE(
)
ENDIF()
# Generate avm_dt[s,c]_types.h, avm_ft[s,c]_types.h
IF(BUILD_RTI)
CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
@@ -152,6 +162,10 @@ ENDIF()
IF(BUILD_RTI)
CODEGEN_CLIENT_TOPICS_IFC(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 avm_enums.hpp.stub to build directory for compilation
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/include/AudioVideoManagement/avm_enums.hpp.stub
@@ -160,6 +174,7 @@ CONFIGURE_FILE(
)
ENDIF()
# Generate avm_db_structs.cpp/.h
CODEGEN_DATABASE_STRUCTS(SRCS_common ${xml_FILE})
@@ -4,9 +4,15 @@
# $Author$
#
# Make ${Qt6_WebSockets} optional
if(QT6_GUI_AVAILABLE AND TARGET Qt6::WebSockets)
set(Qt6_WebSockets ${Qt6_WebSockets})
# Link the real WebSockets module whenever the websocket code path is
# compiled: QT6_WEBSOCKETS_AVAILABLE (root CMakeLists) and the manual
# Qt6::WebSockets import are set when the real module was found. The old
# QT6_GUI_AVAILABLE condition never holds in this environment (Qt6
# discovery takes the minimal path) and the Qt6_WebSockets variable was
# never defined, so the websocket code compiled without the module on the
# link line and failed only at link time.
if(QT6_WEBSOCKETS_REAL_FOUND OR Qt6WebSockets_FOUND)
set(Qt6_WebSockets Qt6::WebSockets)
else()
set(Qt6_WebSockets "")
endif()
@@ -30,6 +36,10 @@ SET(SRCS_common
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/ExerciseEventManagement/eem_enums.hpp.stub
@@ -37,6 +47,7 @@ CONFIGURE_FILE(
COPYONLY
)
ENDIF()
# Generate eem_db_structs.cpp/.h
CODEGEN_DATABASE_STRUCTS(SRCS_common ${xml_FILE})
# Generate eem_db_impl.cpp/.h
@@ -47,6 +58,10 @@ IF(BUILD_RTI)
RTIDDSGEN(SRCS_common eem_enums.idl)
RTIDDSGEN(SRCS_common eem.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 eem_enums.hpp.stub to build directory for compilation
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/include/ExerciseEventManagement/eem_enums.hpp.stub
@@ -55,6 +70,7 @@ CONFIGURE_FILE(
)
ENDIF()
# Generate eem_dt[s,c]_types.h, eem_ft[s,c]_types.h
IF(BUILD_RTI)
CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
@@ -18,6 +18,10 @@ SET(SRCS_common
logger.h
)
# 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 stub file to build directory (fallback when IDL files don't exist)
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/include/ExerciseManagement/exm_enums.hpp.stub
@@ -25,6 +29,7 @@ CONFIGURE_FILE(
COPYONLY
)
ENDIF()
IF(BUILD_RTI)
# Generate exm_enums.idl / exm.idl
CODEGEN_IDL_SVC(SRCS_common ${xml_FILE})
@@ -37,12 +42,6 @@ IF(BUILD_RTI)
CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
# generate exm_[d|f]tc.h
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
ELSE()
# BUILD_RTI=OFF: Use manual stub headers from include/
LIST(APPEND SRCS_common
${CMAKE_SOURCE_DIR}/include/ExerciseManagement/exm_db.h
${CMAKE_SOURCE_DIR}/include/ExerciseManagement/exm_enums.hpp
)
ENDIF()
NGL_ADD_LIBRARY(AAR SV WS HLA svcExmCommon SHARED ${SRCS_common})
@@ -158,6 +158,11 @@ NGL_TARGET_LINK_LIBRARIES(svcFilterManagement
LtsCommandLineParser
svcCoreClient
svcFltServer
# main_handler.cpp includes <DDS/DDSConnector/dds_connector.h>; the
# ddsconnector link in svcFltClient/svcFltServer is PRIVATE and does not
# propagate its exported include dirs (with ddsconnector_export.h) to
# this executable's own TUs.
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
)
NGL_INSTALL_TARGET(svcFilterManagement)
@@ -7,7 +7,7 @@
# Make ${Qt6_Gui} optional
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Gui)
set(Qt6_Gui ${Qt6_Gui})
set(Qt6_Gui Qt6::Gui)
else()
set(Qt6_Gui "")
endif()
@@ -32,6 +32,10 @@ SET(SRCS_common
# Generate ism_enums.idl / ism.idl
IF(BUILD_RTI)
CODEGEN_IDL_SVC(SRCS_common ${xml_FILE})
# 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/InfrastructureManagement/ism_enums.hpp.stub
@@ -39,10 +43,15 @@ CONFIGURE_FILE(
COPYONLY
)
ENDIF()
ENDIF()
# Generate ism_db_impl.cpp/.h, ism_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 ism_enums.hpp.stub to build directory for compilation
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/include/InfrastructureManagement/ism_enums.hpp.stub
@@ -51,11 +60,16 @@ CONFIGURE_FILE(
)
ENDIF()
# Generate *.cpp/*.hpp from idl
IF(BUILD_RTI)
RTIDDSGEN(SRCS_common ism_enums.idl)
RTIDDSGEN(SRCS_common ism.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 ism_enums.hpp.stub to build directory for compilation
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/include/InfrastructureManagement/ism_enums.hpp.stub
@@ -64,21 +78,17 @@ CONFIGURE_FILE(
)
ENDIF()
# Generate ism_dt[s,c]_types.h, ism_ft[s,c]_types.h
IF(BUILD_RTI)
CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
ENDIF()
# Generate ism_[d|f]tc.h
# The former BUILD_GRANTLEE=OFF fallback copied handwritten ism_dtc.h /
# ism_ftc.h onto the CODEGEN_CLIENT_TOPICS_IFC output paths; those fake
# generated files were removed (the qt5 legacy has no such source files).
IF(BUILD_GRANTLEE)
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
ELSEIF(BUILD_RTI)
# Use pre-generated files when BUILD_GRANTLEE=OFF
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/ism_dtc.h ${CMAKE_CURRENT_BINARY_DIR}/ism_dtc.h COPYONLY)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/ism_ftc.h ${CMAKE_CURRENT_BINARY_DIR}/ism_ftc.h COPYONLY)
LIST(APPEND SRCS_common
${CMAKE_CURRENT_BINARY_DIR}/ism_dtc.h
${CMAKE_CURRENT_BINARY_DIR}/ism_ftc.h
)
ENDIF()
NGL_ADD_LIBRARY(AAR SV WS HLA svcIsmCommon SHARED ${SRCS_common})
@@ -111,16 +121,10 @@ SET(SRCS_client
parse_building_xml.h
)
# generate ism_[d|f]tc_impl.[cpp|h]
# ism_dtc_impl_custom.cpp/.h are real service sources (as in the qt5 legacy);
# the BUILD_GRANTLEE=OFF copy of them onto codegen output paths was removed.
IF(BUILD_GRANTLEE)
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
ELSEIF(BUILD_RTI)
# Use pre-generated files when BUILD_GRANTLEE=OFF
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/ism_dtc_impl_custom.cpp ${CMAKE_CURRENT_BINARY_DIR}/ism_dtc_impl_custom.cpp COPYONLY)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/ism_dtc_impl_custom.h ${CMAKE_CURRENT_BINARY_DIR}/ism_dtc_impl_custom.h COPYONLY)
LIST(APPEND SRCS_client
${CMAKE_CURRENT_BINARY_DIR}/ism_dtc_impl_custom.cpp
${CMAKE_CURRENT_BINARY_DIR}/ism_dtc_impl_custom.h
)
ENDIF()
NGL_ADD_LIBRARY(AAR SV WS HLA svcIsmClient SHARED ${SRCS_client})
@@ -22,6 +22,10 @@ SET(SRCS_common
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/NotificationManagement/nom_enums.hpp.stub
@@ -29,10 +33,15 @@ CONFIGURE_FILE(
COPYONLY
)
ENDIF()
# Generate nom_db_impl.cpp/.h, nom_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 nom_enums.hpp.stub to build directory for compilation
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/include/NotificationManagement/nom_enums.hpp.stub
@@ -41,6 +50,7 @@ CONFIGURE_FILE(
)
ENDIF()
# Generate *.cpp/*.hpp from idl
RTIDDSGEN(SRCS_common nom_enums.idl)
RTIDDSGEN(SRCS_common nom.idl)
@@ -18,6 +18,10 @@ SET(SRCS_common
logger.h
)
# 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 stub file to build directory (fallback when IDL files don't exist)
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/include/OperatorManagement/opm_enums.hpp.stub
@@ -25,6 +29,7 @@ CONFIGURE_FILE(
COPYONLY
)
ENDIF()
IF(BUILD_RTI)
# Generate opm_enums.idl / opm.idl
CODEGEN_IDL_SVC(SRCS_common ${xml_FILE})
@@ -37,12 +42,6 @@ IF(BUILD_RTI)
CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
# generate opm_[d|f]tc.h
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
ELSE()
# BUILD_RTI=OFF: Use manual stub headers from include/
LIST(APPEND SRCS_common
${CMAKE_SOURCE_DIR}/include/OperatorManagement/opm_db.h
${CMAKE_SOURCE_DIR}/include/OperatorManagement/opm_enums.hpp
)
ENDIF()
NGL_ADD_LIBRARY(AAR SV WS svcOpmCommon SHARED ${SRCS_common})
@@ -11,9 +11,15 @@ else()
set(Qt6_Gui "")
endif()
# Make ${Qt6_WebSockets} optional
if(QT6_GUI_AVAILABLE AND TARGET Qt6::WebSockets)
set(Qt6_WebSockets ${Qt6_WebSockets})
# Link the real WebSockets module whenever the websocket code path is
# compiled: QT6_WEBSOCKETS_AVAILABLE (root CMakeLists) and the manual
# Qt6::WebSockets import are set when the real module was found. The old
# QT6_GUI_AVAILABLE condition never holds in this environment (Qt6
# discovery takes the minimal path) and the Qt6_WebSockets variable was
# never defined, so the websocket code compiled without the module on the
# link line and failed only at link time.
if(QT6_WEBSOCKETS_REAL_FOUND OR Qt6WebSockets_FOUND)
set(Qt6_WebSockets Qt6::WebSockets)
else()
set(Qt6_WebSockets "")
endif()
@@ -44,6 +50,10 @@ IF(BUILD_RTI)
RTIDDSGEN(SRCS_common ppm_enums.idl)
RTIDDSGEN(SRCS_common ppm.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)
# Stub file for compilation (fallback when no IDL exists)
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/include/ParticipantManagement/ppm_enums.hpp.stub
@@ -51,6 +61,7 @@ CONFIGURE_FILE(
COPYONLY
)
ENDIF()
# Generate ppm_db_structs.cpp/.h
CODEGEN_DATABASE_STRUCTS(SRCS_common ${xml_FILE})
# Generate ppm_db.cpp, ppm_db_impl.cpp/.h
@@ -20,35 +20,14 @@ SET(SRCS_common
logger.h
)
# Copy pdm_types.h to build directory
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/../../../include/ProjectDataManagement/pdm_types.h
${CMAKE_CURRENT_BINARY_DIR}/pdm_types.h
COPYONLY
)
# pdm_types.h was a migration-scaffolding stub with no qt5 counterpart and
# no consumer; the stub in include/ was removed and the copy with it.
# Copy pdm_translation.h to build directory
# Only when BUILD_GRANTLEE=OFF (stub header). With BUILD_GRANTLEE=ON the
# codegen writes the real pdm_translation.h to the same build-dir path
# (see "Generating ... pdm_translation.h" in CODEGEN_IDL_SVC); copying the
# stub here would overwrite the generated file on every cmake re-configure
# and break incremental builds. Same guard pattern as pdm_enums.hpp below.
IF(NOT BUILD_GRANTLEE)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/../../../include/ProjectDataManagement/pdm_translation.h
${CMAKE_CURRENT_BINARY_DIR}/pdm_translation.h
COPYONLY
)
ENDIF()
# Copy pdm_enums.hpp to build directory (when BUILD_RTI=OFF)
IF(NOT BUILD_RTI)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/../../../include/ProjectDataManagement/pdm_enums.hpp
${CMAKE_CURRENT_BINARY_DIR}/pdm_enums.hpp
COPYONLY
)
ENDIF()
# pdm_translation.h and pdm_enums.hpp stub copies (OFF-variant fallbacks whose
# include/ sources were removed together with the other shadowing stubs):
# with BUILD_GRANTLEE=ON and BUILD_RTI=ON the codegen writes the real files to
# these build-dir paths, so the copies are gone rather than kept for forbidden
# OFF variants.
# Add current binary dir to include path for generated headers
NGL_TARGET_INCLUDE_DIRECTORIES(${PDM_COMMON_TARGET}
@@ -20,6 +20,10 @@ SET(SRCS_common
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/ReportManagement/rep_enums.hpp.stub
@@ -27,10 +31,15 @@ CONFIGURE_FILE(
COPYONLY
)
ENDIF()
# Generate rep_db_impl.cpp/.h, rep_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 rep_enums.hpp.stub to build directory for compilation
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/include/ReportManagement/rep_enums.hpp.stub
@@ -39,6 +48,7 @@ CONFIGURE_FILE(
)
ENDIF()
# Generate *.cpp/*.hpp from idl
RTIDDSGEN(SRCS_common rep_enums.idl)
RTIDDSGEN(SRCS_common rep.idl)
@@ -22,6 +22,10 @@ SET(SRCS_common
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
@@ -29,10 +33,15 @@ CONFIGURE_FILE(
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
@@ -41,11 +50,16 @@ CONFIGURE_FILE(
)
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
@@ -54,6 +68,7 @@ CONFIGURE_FILE(
)
ENDIF()
# Generate srp_dt[s,c]_types.h, srp_ft[s,c]_types.h
IF(BUILD_RTI)
CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
@@ -0,0 +1,37 @@
#
# $Id$
# $HeadURL$
# $Author$
#
# The GDAL-based ElevationMap module is not yet migrated to Qt6 (see the
# commented-out entries in ../CMakeLists.txt). LtsElevation still needs an
# ElevationMapManager, so build the compatibility stub that lives in the
# src/ + include/ scaffolding (same API as the Qt5 class, no GDAL).
NGL_ADD_LIBRARY(WS AAR HLA SV situationMapElevationMap SHARED
${CMAKE_SOURCE_DIR}/src/Viewer/SituationMap/ElevationMap/elevation_map_manager.cpp
# The header lives in include/Viewer/SituationMap/ElevationMap, apart from
# the cpp. AUTOMOC only mocs headers that are target sources (or sit next
# to one); MOC_INCLUDES merely feeds moc's own -I flags, not header
# discovery. Listed explicitly, otherwise the vtable/staticMetaObject are
# undefined and the link of libsituationMapElevationMap.so fails.
${CMAKE_SOURCE_DIR}/include/Viewer/SituationMap/ElevationMap/elevation_map_manager.h
)
# The stub's ElevationMapManager is a Q_OBJECT class; without AUTOMOC the
# moc symbols (staticMetaObject/vtable) are missing and the link of
# libsituationMapElevationMap.so fails, cascading to every target that
# links it (same pattern as LtsSessionDataDds).
set_target_properties(situationMapElevationMap PROPERTIES AUTOMOC ON)
NGL_TARGET_INCLUDE_DIRECTORIES(situationMapElevationMap
PUBLIC
# The stub cpp does #include "elevation_map_manager.h" - it lives in
# include/Viewer/SituationMap/ElevationMap/, not next to the source.
${CMAKE_SOURCE_DIR}/include/Viewer/SituationMap/ElevationMap
${CMAKE_SOURCE_DIR}/include
)
NGL_TARGET_LINK_LIBRARIES(situationMapElevationMap
PUBLIC
Qt6::Core
)