Continue the Qt5->Qt6 migration so the LTS Projects (Group 10) and LTS
Application (Group 11) compile, link, and ctest runs.
Qt5->Qt6 API migration (resolves removed/deprecated Qt6 APIs) across Lts
Tools and Apps, e.g. QAction->QActionGroup, QAbstractSocket::errorOccurred,
Qt::SkipEmptyParts, QRandomGenerator, QInputDevice::DeviceType,
QRegularExpression, QLatin1Literal->QStringLiteral, and the SampleModel
m_description->description rename.
CMake build fixes:
- CMakeLists.txt: add Lts/Common to CMAKE_AUTOMOC_INCLUDE_DIRECTORIES so moc
resolves Q_INTERFACES(ProjectPlugin::Plugin) for the migrated Projects.
- cmake/NGLMacros.cmake: NGL_COMPILE_RESOURCES - replace return() (which aborts
the calling CMakeLists.txt) with an if/else/endif.
- OpApp/THP: guard the ArcGISQt5Hack link with $<IF:$<TARGET_EXISTS:...>> (the
target is absent when the SituationMap viewer is stubbed); matches
CentralEffectSimulation.
- LtsSession: prefer the in-tree svcCoreClient target over a FIND_LIBRARY in
/usr/local/lib.
- CnrProxyTester/DotMatrixDisplay: set AUTOUIC_SEARCH_PATHS for the ui/ subdir.
- TopicDiscover: link NGLLogger.
Export-header visibility stubs (expand the empty *_EXPORT macro to
__attribute__((visibility("default"))); the build sets -fvisibility=hidden and
these stubs shadow the CMake-generated header):
- include/LtsProjectionWorkstation/ltsprojectionworkstation_export.h (fixes
undefined reference to LtsProjectionWorkstation::getInstance /
setProjectionOperatorPreset)
- include/LtsSession/ltssession_export.h, include/LtsUtilsGuiDds/ltsutilsguidds_export.h (same pattern)
New plugin modules (copied from legacy) so LtsAppDescriptorChecker finds the
gui:3 IIDs referenced by the Projects' apps.json:
- TakeHomePackageManager/OldTHP gui:3:tpm.man, gui:3:tpm.usb
- PresentationManagement/.../ScriptEditor gui:3:pre.script.edit
- Timeline/Gui/EventTimelineClassic gui:3:tln.view
new_docker_build.sh: correct group targets to the actual CMake target names,
guard LtsReportDisplay on BUILD_CODIFICATION, and skip modules unavailable in
the prebuilt image (AsmWorkstationCertifier/botan2, TrajectoryWidget,
VideoImport, thp_viewer/VLC).
157 lines
4.1 KiB
CMake
Executable File
157 lines
4.1 KiB
CMake
Executable File
#
|
|
# $Id$
|
|
# $HeadURL$
|
|
# $Author$
|
|
# Created by Mike Wille, SLSE, 2016-05-15
|
|
#
|
|
|
|
# RTI Connext DDS - uses IMPORTED targets from parent CMakeLists.txt
|
|
# Make ${Qt6_Gui} optional
|
|
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Gui)
|
|
set(Qt6_Gui ${Qt6_Gui})
|
|
else()
|
|
set(Qt6_Gui "")
|
|
endif()
|
|
|
|
# BUILD_RTI is set by parent CMakeLists.txt - do not override here
|
|
# RTI paths are also set by parent and imported targets are available
|
|
|
|
# LtsSessionDataDds (always built, with stub implementation for non-RTI builds)
|
|
SET(LtsSessionDataDds_SRCS
|
|
lts_session_data_dds.cpp
|
|
lts_session_data_dds.h
|
|
)
|
|
NGL_ADD_LIBRARY2(WS LtsSessionDataDds SHARED ${LtsSessionDataDds_SRCS})
|
|
set_target_properties(LtsSessionDataDds PROPERTIES AUTOMOC ON)
|
|
NGL_TARGET_INCLUDE_DIRECTORIES(LtsSessionDataDds
|
|
PUBLIC
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
)
|
|
NGL_TARGET_LINK_LIBRARIES(LtsSessionDataDds
|
|
PRIVATE
|
|
$<$<BOOL:${BUILD_RTI}>:$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>>
|
|
PUBLIC
|
|
$<$<BOOL:${BUILD_RTI}>:RTI::nddscore>
|
|
$<$<BOOL:${BUILD_RTI}>:ddsQoS>
|
|
# Generated Core type support (topic_type_support<Core::PartitionTime>, ...)
|
|
$<$<BOOL:${BUILD_RTI}>:$<IF:$<TARGET_EXISTS:ddscore>,ddscore,>>
|
|
NGLLogger
|
|
Qt6::Core
|
|
)
|
|
IF(BUILD_RTI)
|
|
NGL_TARGET_INCLUDE_DIRECTORIES(LtsSessionDataDds
|
|
PUBLIC
|
|
${RTI_INCLUDE_DIR}
|
|
${CMAKE_SOURCE_DIR}/Lts
|
|
${CMAKE_SOURCE_DIR}/include
|
|
${CMAKE_BINARY_DIR}/Lts/DDS
|
|
)
|
|
# ddscore target generates core_dtc_types.h
|
|
ADD_DEPENDENCIES(LtsSessionDataDds ddscore)
|
|
NGL_TARGET_LINK_DIRECTORIES(LtsSessionDataDds
|
|
PRIVATE
|
|
${RTI_LIB_DIR}
|
|
)
|
|
ENDIF()
|
|
IF(BUILD_RTI)
|
|
TARGET_COMPILE_DEFINITIONS(LtsSessionDataDds PUBLIC BUILD_RTI)
|
|
ENDIF()
|
|
|
|
|
|
|
|
# LtsSession (RTI dependencies optional)
|
|
SET(ltssession_SRCS
|
|
lts_session.h
|
|
lts_session.cpp
|
|
lts_session_lock_handler.h
|
|
lts_session_manager.h
|
|
lts_session_manager.cpp
|
|
lts_session_lock_handler.cpp
|
|
)
|
|
|
|
NGL_ADD_LIBRARY2(WS LtsSession SHARED ${ltssession_SRCS})
|
|
NGL_TARGET_INCLUDE_DIRECTORIES(LtsSession
|
|
PUBLIC
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../
|
|
${CMAKE_CURRENT_BINARY_DIR}/../
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../LtsUtils/LtsUtilsGui
|
|
)
|
|
|
|
# Optional external dependencies
|
|
# Prefer the in-tree target: a fresh build tree does not have svcCoreClient
|
|
# installed in /usr/local/lib, and the Core::Interface::Ftc::create symbols
|
|
# referenced at link time live in libsvcCoreClient.so
|
|
IF(TARGET svcCoreClient)
|
|
SET(SVCCORECLIENT_LIBRARY svcCoreClient)
|
|
ELSE()
|
|
FIND_LIBRARY(SVCCORECLIENT_LIBRARY NAMES svcCoreClient PATHS /usr/local/lib /usr/lib NO_DEFAULT_PATH)
|
|
ENDIF()
|
|
FIND_LIBRARY(OHPONLINEHELP_LIBRARY NAMES OhpOnlineHelpViewerGuiPluginInterface PATHS /usr/local/lib /usr/lib NO_DEFAULT_PATH)
|
|
|
|
SET(LtsSession_PRIVATE_LIBS
|
|
Qt6::Network
|
|
LtsMultiMonitor
|
|
LtsSessionData
|
|
LtsUtilsGuiDds # ReqHelpr & for Debug Menu ! TODO: rm on release!
|
|
LtsNotification
|
|
$<IF:$<TARGET_EXISTS:Qt6::Svg>,Qt6::Svg,>
|
|
)
|
|
IF(SVCCORECLIENT_LIBRARY)
|
|
LIST(APPEND LtsSession_PRIVATE_LIBS ${SVCCORECLIENT_LIBRARY})
|
|
ENDIF()
|
|
IF(OHPONLINEHELP_LIBRARY)
|
|
LIST(APPEND LtsSession_PRIVATE_LIBS ${OHPONLINEHELP_LIBRARY})
|
|
ENDIF()
|
|
|
|
NGL_TARGET_LINK_LIBRARIES(LtsSession
|
|
PRIVATE
|
|
${LtsSession_PRIVATE_LIBS}
|
|
PUBLIC
|
|
LtsWidgets
|
|
Qt6::Core
|
|
GuiPluginInterface
|
|
DataPluginInterface
|
|
NGLLogger
|
|
ProjectConfig
|
|
LtsSessionDataDds # Always link, even in stub mode
|
|
)
|
|
IF(BUILD_RTI)
|
|
NGL_TARGET_LINK_LIBRARIES(LtsSession
|
|
PRIVATE
|
|
ddsconnector
|
|
PUBLIC
|
|
RTI::nddscore
|
|
)
|
|
TARGET_COMPILE_DEFINITIONS(LtsSession PUBLIC BUILD_RTI)
|
|
ENDIF()
|
|
|
|
|
|
# LtsSessionData (avoid cross-deps between AppManager, Session and PluginManager)
|
|
SET(LtsSessionData_SRCS
|
|
lts_session_data.cpp
|
|
lts_session_data.h
|
|
)
|
|
|
|
NGL_ADD_LIBRARY2(WS TOOLSSV TOOLSWS LtsSessionData SHARED ${LtsSessionData_SRCS})
|
|
|
|
NGL_TARGET_INCLUDE_DIRECTORIES(LtsSessionData
|
|
PUBLIC
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../
|
|
)
|
|
|
|
if(QT6_GUI_AVAILABLE)
|
|
NGL_TARGET_LINK_LIBRARIES(LtsSessionData
|
|
PUBLIC
|
|
Qt6::Core
|
|
Qt6::Gui # QPixmap as Storage for Profile Picture
|
|
)
|
|
endif()
|
|
IF(BUILD_RTI)
|
|
NGL_TARGET_LINK_LIBRARIES(LtsSessionData
|
|
PUBLIC
|
|
RTI::nddscore
|
|
)
|
|
TARGET_COMPILE_DEFINITIONS(LtsSessionData PUBLIC BUILD_RTI)
|
|
ENDIF()
|