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
@@ -4,9 +4,15 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# 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()
|
||||
@@ -30,6 +36,10 @@ SET(SRCS_common
|
||||
IF(BUILD_RTI)
|
||||
CODEGEN_IDL_SVC(SRCS_common ${xml_FILE})
|
||||
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/ExerciseEventManagement/eem_enums.hpp.stub
|
||||
@@ -37,6 +47,7 @@ CONFIGURE_FILE(
|
||||
COPYONLY
|
||||
)
|
||||
|
||||
ENDIF()
|
||||
# Generate eem_db_structs.cpp/.h
|
||||
CODEGEN_DATABASE_STRUCTS(SRCS_common ${xml_FILE})
|
||||
# Generate eem_db_impl.cpp/.h
|
||||
@@ -47,6 +58,10 @@ IF(BUILD_RTI)
|
||||
RTIDDSGEN(SRCS_common eem_enums.idl)
|
||||
RTIDDSGEN(SRCS_common eem.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)
|
||||
# Copy eem_enums.hpp.stub to build directory for compilation
|
||||
CONFIGURE_FILE(
|
||||
${CMAKE_SOURCE_DIR}/include/ExerciseEventManagement/eem_enums.hpp.stub
|
||||
@@ -55,6 +70,7 @@ CONFIGURE_FILE(
|
||||
)
|
||||
|
||||
|
||||
ENDIF()
|
||||
# Generate eem_dt[s,c]_types.h, eem_ft[s,c]_types.h
|
||||
IF(BUILD_RTI)
|
||||
CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
|
||||
|
||||
Reference in new issue
Block a user