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,7 +6,7 @@
|
||||
|
||||
# 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()
|
||||
@@ -42,12 +42,6 @@ CODEGEN_DATABASE(SRCS_common ${xml_FILE})
|
||||
|
||||
# Generate *.cpp/*.hpp from idl
|
||||
RTIDDSGEN(SRCS_common bld_enums.idl)
|
||||
# Stub file for compilation (fallback when no IDL exists)
|
||||
CONFIGURE_FILE(
|
||||
${CMAKE_SOURCE_DIR}/include/Buildings/bld_enums.hpp.stub
|
||||
${CMAKE_BINARY_DIR}/Lts/Proxies/Buildings/bld_enums.hpp
|
||||
COPYONLY
|
||||
)
|
||||
RTIDDSGEN(SRCS_common bld.idl)
|
||||
|
||||
# Generate bld_dt[s,c]_types.h, bld_ft[s,c]_types.h
|
||||
@@ -85,6 +79,11 @@ SET(SRCS_client
|
||||
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV WS svcBldClient SHARED ${SRCS_client})
|
||||
# NGL_ADD_LIBRARY2 (unlike NGL_ADD_LIBRARY) does not define the
|
||||
# MAKE_<SYMBOL>_LIB compile guard, but the generated bld_[d|f]tc_impl.h
|
||||
# headers that this target compiles carry such a guard — same situation as
|
||||
# ddscore, which defines MAKE_DDSCORE_LIB explicitly for the same reason.
|
||||
TARGET_COMPILE_DEFINITIONS(svcBldClient PRIVATE MAKE_SVCBLDCLIENT_LIB)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcBldClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
@@ -113,6 +112,9 @@ SET(SRCS_server
|
||||
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV svcBldServer SHARED ${SRCS_server})
|
||||
# Same guard rationale as svcBldClient above: the generated
|
||||
# bld_[d|f]ts_impl.h headers require MAKE_SVCBLDSERVER_LIB.
|
||||
TARGET_COMPILE_DEFINITIONS(svcBldServer PRIVATE MAKE_SVCBLDSERVER_LIB)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcBldServer
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
|
||||
Reference in new issue
Block a user