Reworks CMake wiring for Qt6 codegen include order
Adds missing toolchain packages and include dirs so generated headers resolve.
This commit is contained in:
25 files changed
+388
-84
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user