Migration of Legatus codebase to Qt6 with RTI Connext DDS 7.7 integration is partially complete. Core DDS targets build successfully, but ProjectDataManagement module blocks full ddsfts compilation due to IDL definition conflicts.
This commit is contained in:
256 files changed
+1170
-610
No files matched your search
@@ -5,9 +5,10 @@ cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
# Qt6 finden (wird vom Hauptprojekt gesetzt, aber sicherheitshalber hier auch)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
# Try standard find_package first, fall back to manual targets if OpenGL missing
|
||||
find_package(Qt6 QUIET COMPONENTS Core Gui Widgets Test)
|
||||
if(NOT TARGET Qt6::Gui OR NOT TARGET Qt6::Widgets)
|
||||
# Check if targets already exist from parent CMakeLists.txt
|
||||
if(TARGET Qt6::Core AND TARGET Qt6::Gui AND TARGET Qt6::Widgets AND TARGET Qt6::Test)
|
||||
# Already found by parent - use existing targets
|
||||
elseif(NOT TARGET Qt6::Gui OR NOT TARGET Qt6::Widgets)
|
||||
# Manual fallback: create imported targets when standard find fails due to OpenGL
|
||||
if(NOT TARGET Qt6::Gui)
|
||||
add_library(Qt6::Gui SHARED IMPORTED)
|
||||
@@ -24,31 +25,36 @@ if(QT6_GUI_AVAILABLE)
|
||||
INTERFACE_LINK_LIBRARIES "Qt6::Gui;Qt6::Core"
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
# Try standard find_package first, fall back to manual targets if OpenGL missing
|
||||
find_package(Qt6 QUIET COMPONENTS Core Gui Widgets Test)
|
||||
endif()
|
||||
# Ensure Core and Test are found
|
||||
if(NOT TARGET Qt6::Core)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Test)
|
||||
endif()
|
||||
else()
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Test)
|
||||
endif()
|
||||
|
||||
# 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)
|
||||
if(NOT TARGET Qt6::Core OR NOT TARGET Qt6::Test)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Test)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Nur bauen wenn BUILD_TESTING aktiviert ist
|
||||
if(BUILD_TESTING)
|
||||
# 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()
|
||||
|
||||
# Collect all test source files dynamically
|
||||
file(GLOB MIGRATION_TEST_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/test_*.cpp")
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ TEST(MigrationStubs, CoreDtcCompiles)
|
||||
}
|
||||
|
||||
// DDS Core
|
||||
#include "DDS/Core/core_dtc.h"
|
||||
#include "Core/core_dtc.h"
|
||||
|
||||
TEST(MigrationStubs, DDSCoreDtcCompiles)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user