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
@@ -6,14 +6,14 @@
|
||||
|
||||
# Make ${Qt6_Gui} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Gui)
|
||||
set(Qt6_Gui ${Qt6_Gui})
|
||||
set(Qt6_Gui Qt6::Gui)
|
||||
else()
|
||||
set(Qt6_Gui "")
|
||||
endif()
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
set(Qt6_Widgets Qt6::Widgets)
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
@@ -70,12 +70,10 @@ LIST(APPEND SRCS_common ${in_file_sql} ${out_file_sql})
|
||||
# Generate aes_enums.idl / aes.idl / aes_enums.cpp/aes_enums.h
|
||||
IF(BUILD_RTI)
|
||||
CODEGEN_IDL_SVC(SRCS_common ${xml_FILE})
|
||||
# Stub enum header for tests when BUILD_RTI=ON but no IDL
|
||||
IF(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/aes_enums.idl")
|
||||
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/include/AreaEffectSimulation/aes_enums.hpp.stub"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/aes_enums.hpp"
|
||||
COPYONLY)
|
||||
ENDIF()
|
||||
# The former stub copy for aes_enums.hpp ran unconditionally here: its
|
||||
# IF(NOT EXISTS) guard checked the source dir, but CODEGEN_IDL_SVC writes
|
||||
# aes_enums.idl into the build dir, so the stub always overwrote the
|
||||
# rtiddsgen-generated header on re-configure. Removed for the ON build.
|
||||
ENDIF()
|
||||
# Generate aes_db_structs.cpp/.h
|
||||
CODEGEN_DATABASE_STRUCTS(SRCS_common ${xml_FILE})
|
||||
|
||||
Reference in new issue
Block a user