- LtsWidgets: Fixed Qt6 API compatibility issues - QWheelEvent::delta() → angleDelta().y() - QStyleOption::init() → initFrom() - QComboBox activated signal signature change - QTextCodec removal (UTF-8 default in Qt6) - Missing widget includes added - LtsWebSocket: Fixed m_logger reference initialization - Added NGLLoggerBootstrap includes - Proper initialization in constructor initializer lists - CMake: Added BUILD_LTSWEBSOCKET option for temporary exclusion - Docker: RTI Connext permanent installation script added - ci/install-rti-in-docker.sh for persistent RTI setup - Removes need for volume mounting RTI into container - BUILD options: FilterManagement, RTI, Codification, Grantlee, LtsWebSocket can be disabled for partial builds during migration Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
85 lines
2.8 KiB
CMake
85 lines
2.8 KiB
CMake
# CMakeLists.txt für Qt6-Migrationstests
|
|
# Diese Tests validieren BUILD_RTI Guards, Qt6-Kompatibilität und RTI-Integration
|
|
|
|
cmake_minimum_required(VERSION 3.16)
|
|
|
|
# Qt6 finden (wird vom Hauptprojekt gesetzt, aber sicherheitshalber hier auch)
|
|
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets Test)
|
|
|
|
# Try to find system-wide GTest first, fallback to FetchContent
|
|
find_package(GTest QUIET)
|
|
if(NOT TARGET GTest::gtest_main)
|
|
include(FetchContent)
|
|
FetchContent_Declare(
|
|
googletest
|
|
GIT_REPOSITORY https://github.com/google/googletest.git
|
|
GIT_TAG v1.13.0
|
|
)
|
|
# For Windows: Prevent overriding the parent project's compiler/linker settings
|
|
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
|
FetchContent_MakeAvailable(googletest)
|
|
endif()
|
|
|
|
# Nur bauen wenn BUILD_TESTING aktiviert ist
|
|
if(BUILD_TESTING)
|
|
# Collect all test source files
|
|
set(MIGRATION_TEST_SOURCES
|
|
test_build_rti_guards.cpp
|
|
test_qt6_compatibility.cpp
|
|
test_qt6_api_migrations.cpp
|
|
test_export_headers.cpp
|
|
test_symbology_xml.cpp
|
|
test_saa_telegrams.cpp
|
|
test_rti_integration.cpp
|
|
test_ltswidgets_qt6.cpp
|
|
)
|
|
|
|
# Check which files actually exist
|
|
set(EXISTING_SOURCES "")
|
|
foreach(src ${MIGRATION_TEST_SOURCES})
|
|
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${src}")
|
|
list(APPEND EXISTING_SOURCES "${src}")
|
|
endif()
|
|
endforeach()
|
|
|
|
if(EXISTING_SOURCES)
|
|
add_executable(migration_tests ${EXISTING_SOURCES})
|
|
|
|
target_compile_features(migration_tests PRIVATE cxx_std_23)
|
|
|
|
target_include_directories(migration_tests PRIVATE
|
|
${CMAKE_SOURCE_DIR}
|
|
${CMAKE_SOURCE_DIR}/include
|
|
)
|
|
|
|
# Link against Qt6 components
|
|
target_link_libraries(migration_tests PRIVATE
|
|
Qt6::Core
|
|
Qt6::Gui
|
|
Qt6::Widgets
|
|
Qt6::Test
|
|
GTest::gtest_main
|
|
)
|
|
|
|
# RTI libraries if BUILD_RTI is ON
|
|
if(BUILD_RTI)
|
|
find_package(RTI QUIET)
|
|
if(RTI_FOUND)
|
|
target_include_directories(migration_tests PRIVATE ${RTI_INCLUDE_DIRS})
|
|
target_link_libraries(migration_tests PRIVATE ${RTI_LIBRARIES})
|
|
target_compile_definitions(migration_tests PRIVATE BUILD_RTI=1)
|
|
message(STATUS "RTI found: ${RTI_LIBRARIES}")
|
|
else()
|
|
message(STATUS "BUILD_RTI=ON but RTI not found - building tests without RTI")
|
|
endif()
|
|
endif()
|
|
|
|
# Register with CTest
|
|
include(GoogleTest)
|
|
gtest_discover_tests(migration_tests)
|
|
|
|
message(STATUS "Migration tests enabled: ${EXISTING_SOURCES}")
|
|
else()
|
|
message(WARNING "No migration test sources found in ${CMAKE_CURRENT_SOURCE_DIR}")
|
|
endif()
|
|
endif() |