BUILD_RTI conditional fixes and Qt6 API updates

- cmake/FindRTI.cmake: Add INTERFACE placeholder targets when RTI not found
- cmake/FindRTI.cmake: Force BUILD_RTI=OFF when RTI not installed
- Lts/Common/LtsSession/CMakeLists.txt: Make LtsSessionDataDds conditional on BUILD_RTI
- Lts/Viewer/CMakeLists.txt: Make LtsDataView conditional on BUILD_RTI
- Lts/Plugins/*/CMakeLists.txt: 97 plugin files wrapped in BUILD_RTI conditionals
- cmake/NGLMacros.cmake: Fix NGL_ADD_BIG_RESOURCES macro (removed premature return())
- Multiple Qt6 API fixes: QLinkedList→std::list, QStringRef→QStringView, etc.
- BUILD_RTI_FIXES_SUMMARY.md: Comprehensive documentation of all fixes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-08-19 09:24:50 +02:00
1 parent b774f4035c
commit 4c9861a469
2065 files changed
+48219 -1763

No files matched your search

@@ -126,6 +126,27 @@ IF(NOT RTI_INCLUDE_DIR)
message(WARNING "Skipping RTI include search because RTI installation was not found")
set(RTI_INCLUDE_DIR "")
set(RTI_INCLUDE_DIRS "" CACHE STRING "RTI include directories" FORCE)
# Create placeholder INTERFACE targets for all RTI libraries when RTI is not installed
# These allow configuration to succeed but will cause link errors if actually used
SET(_RTI_LIBS nddscore nddsc nddscpp2 rtiroutingservice)
FOREACH(_lib ${_RTI_LIBS})
SET(_tgt_name RTI::${_lib})
IF(NOT TARGET ${_tgt_name})
ADD_LIBRARY(${_tgt_name} INTERFACE IMPORTED)
SET_PROPERTY(TARGET ${_tgt_name} PROPERTY INTERFACE_INCLUDE_DIRECTORIES "")
# Set dummy library variables to satisfy Ninja dependency tracking
SET(RTI_${_lib}_LIBRARY "" CACHE STRING "RTI ${_lib} library (placeholder)" FORCE)
SET(RTI_${_lib}_LIBRARY_RELEASE "" CACHE STRING "RTI ${_lib} library release (placeholder)" FORCE)
SET(RTI_${_lib}_LIBRARY_DEBUG "" CACHE STRING "RTI ${_lib} library debug (placeholder)" FORCE)
ENDIF()
ENDFOREACH()
SET(RTI_LIBRARIES "" CACHE STRING "All rti libraries (placeholder)" FORCE)
SET(RTI_FOUND FALSE CACHE BOOL "RTI not found" FORCE)
# Force BUILD_RTI to OFF when RTI is not actually installed
SET(BUILD_RTI OFF CACHE BOOL "Build with RTI support" FORCE)
MESSAGE(WARNING "RTI not found - disabling BUILD_RTI. Set DDS_PATH to RTI installation to enable RTI features.")
return()
else()
FIND_PATH(RTI_INCLUDE_DIR ndds/ndds_cpp.h HINTS ${_rti_include_hint})
IF(RTI_INCLUDE_DIR)
@@ -590,15 +590,15 @@ MACRO(NGL_ADD_BIG_RESOURCES)
# Qt6 path: use qt6_add_resources
if(TARGET Qt6::Core)
qt6_add_resources(${ARGN})
return()
# Note: Removed return() as it exits the calling CMakeLists.txt file
else()
GET_PROPERTY(ipo_active VARIABLE PROPERTY CMAKE_INTERPROCEDURAL_OPTIMIZATION)
IF(CMAKE_VERSION VERSION_GREATER 3.8.99 AND Qt6Core_VERSION VERSION_GREATER 5.12.99 AND NOT WIN32 AND NOT ipo_active)
QT5_ADD_BIG_RESOURCES(${ARGN})
ELSE()
QT5_ADD_RESOURCES(${ARGN})
ENDIF()
endif()
GET_PROPERTY(ipo_active VARIABLE PROPERTY CMAKE_INTERPROCEDURAL_OPTIMIZATION)
IF(CMAKE_VERSION VERSION_GREATER 3.8.99 AND Qt6Core_VERSION VERSION_GREATER 5.12.99 AND NOT WIN32 AND NOT ipo_active)
QT5_ADD_BIG_RESOURCES(${ARGN})
ELSE()
QT5_ADD_RESOURCES(${ARGN})
ENDIF()
ENDMACRO()