Reworks FileManagement codegen wiring and WebSockets link
This commit is contained in:
1 parent
4ee52e2f52
commit
d79d89c352
1 file changed
+26
-45
@@ -7,6 +7,12 @@
|
||||
INCLUDE(MacroRTIDDSGen)
|
||||
INCLUDE(MacroCodeGenIdl)
|
||||
|
||||
# Resolve <DDS/...> includes (generic_data_reader.h, generic_dtc.h, ...) to the
|
||||
# real headers under Lts/DDS/ instead of the migration stub tree in include/.
|
||||
# Qt5 legacy resolved these the same way; the stub tree shadows them otherwise
|
||||
# (it opens namespace DDSGeneric around framework includes and breaks Qt6).
|
||||
include_directories(BEFORE ${CMAKE_SOURCE_DIR}/Lts)
|
||||
|
||||
SET(xml_FILE flm_service.xml)
|
||||
|
||||
#
|
||||
@@ -20,42 +26,24 @@ SET(SRCS_common
|
||||
logger.h
|
||||
)
|
||||
|
||||
# Copy stub file to build directory (fallback when IDL files don't exist)
|
||||
CONFIGURE_FILE(
|
||||
${CMAKE_SOURCE_DIR}/include/FileManagement/flm_enums.hpp.stub
|
||||
${CMAKE_BINARY_DIR}/Lts/Services/FileManagement/flm_enums.hpp
|
||||
COPYONLY
|
||||
)
|
||||
# Generate flm_enums.idl / flm.idl
|
||||
CODEGEN_IDL_SVC(SRCS_common ${xml_FILE})
|
||||
# Generate flm_db_impl.cpp/.h, flm_db.h
|
||||
CODEGEN_DATABASE(SRCS_common ${xml_FILE})
|
||||
# Generate *.cpp/*.hpp from idl
|
||||
RTIDDSGEN(SRCS_common flm_enums.idl)
|
||||
RTIDDSGEN(SRCS_common flm.idl)
|
||||
# Generate flm_dt[s,c]_types.h, flm_ft[s,c]_types.h
|
||||
CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
|
||||
# generate flm_[d|f]tc.h
|
||||
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
|
||||
|
||||
# Add current binary dir to include path for generated headers
|
||||
NGL_ADD_LIBRARY(AAR SV WS svcFlmCommon SHARED ${SRCS_common})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcFlmCommon
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
# Generate flm_enums.idl / flm.idl
|
||||
CODEGEN_IDL_SVC(SRCS_common ${xml_FILE})
|
||||
# Generate flm_db_impl.cpp/.h, flm_db.h
|
||||
CODEGEN_DATABASE(SRCS_common ${xml_FILE})
|
||||
# Generate *.cpp/*.hpp from idl
|
||||
RTIDDSGEN(SRCS_common flm_enums.idl)
|
||||
RTIDDSGEN(SRCS_common flm.idl)
|
||||
# Generate flm_dt[s,c]_types.h, flm_ft[s,c]_types.h
|
||||
CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
|
||||
# generate flm_[d|f]tc.h
|
||||
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
|
||||
ELSE()
|
||||
# BUILD_RTI=OFF: Use manual stub headers from include/
|
||||
LIST(APPEND SRCS_common
|
||||
${CMAKE_SOURCE_DIR}/include/FileManagement/flm_db.h
|
||||
${CMAKE_SOURCE_DIR}/include/FileManagement/flm_enums.hpp
|
||||
${CMAKE_SOURCE_DIR}/include/FileManagement/flm_ftc.h
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
NGL_ADD_LIBRARY(AAR SV WS svcFlmCommon SHARED ${SRCS_common})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcFlmCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -77,10 +65,8 @@ SET(SRCS_client
|
||||
flm_export.h
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
# generate flm_ftc_impl.[cpp|h]
|
||||
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
|
||||
ENDIF()
|
||||
# generate flm_ftc_impl.[cpp|h]
|
||||
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY(WS AAR SV svcFlmClient SHARED ${SRCS_client})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcFlmClient
|
||||
@@ -108,10 +94,8 @@ SET(SRCS_server
|
||||
convert_db_to_dds.h
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
# generate flm_[d|f]ts.h, flm_[d|f]ts_impl.[cpp|h]
|
||||
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
|
||||
ENDIF()
|
||||
# generate flm_[d|f]ts.h, flm_[d|f]ts_impl.[cpp|h]
|
||||
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY(WS AAR SV svcFlmServer SHARED ${SRCS_server})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcFlmServer
|
||||
@@ -135,9 +119,7 @@ NGL_INSTALL_TARGET(svcFlmServer)
|
||||
#
|
||||
# --- Topic Type Plugin --------------------------------------------------------------
|
||||
#
|
||||
IF(BUILD_RTI)
|
||||
CREATE_TOPIC_TYPE_PLUGIN(${xml_FILE})
|
||||
ENDIF()
|
||||
CREATE_TOPIC_TYPE_PLUGIN(${xml_FILE})
|
||||
|
||||
#
|
||||
# --- Executable svcFileManagement (sFlm) -------------------------------------------------
|
||||
@@ -192,15 +174,14 @@ SET(SRCS_exe
|
||||
${xml_FILE}
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
# Generate flm.sql, flm.xml
|
||||
CODEGEN_SQL(SRCS_exe ${xml_FILE})
|
||||
ENDIF()
|
||||
# Generate flm.sql, flm.xml
|
||||
CODEGEN_SQL(SRCS_exe ${xml_FILE})
|
||||
|
||||
NGL_ADD_SVC_ICON(SRCS_exe)
|
||||
NGL_ADD_EXECUTABLE(AAR SV svcFileManagement ${SRCS_exe})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcFileManagement
|
||||
Qt6::Core
|
||||
Qt6::WebSockets
|
||||
svcCoreClient
|
||||
svcFlmCommon
|
||||
svcFlmServer
|
||||
|
||||
Reference in new issue
Block a user