# # $Id$ # $HeadURL$ # $Author$ # # 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() INCLUDE(MacroRTIDDSGen) INCLUDE(MacroCodeGenIdl) SET(xml_FILE eem_service.xml) # # --- Library svcEemCommon -------------------------------------------------------------------------------- # SET(SRCS_common eem_export.h logger.cpp logger.h ) # Generate eem_enums.idl / eem.idl IF(BUILD_RTI) CODEGEN_IDL_SVC(SRCS_common ${xml_FILE}) ENDIF() # The enums stub copy below would overwrite the rtiddsgen-generated # _enums.hpp (RTIDDSGEN on _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 ${CMAKE_BINARY_DIR}/Lts/Services/ExerciseEventManagement/eem_enums.hpp COPYONLY ) ENDIF() # Generate eem_db_structs.cpp/.h CODEGEN_DATABASE_STRUCTS(SRCS_common ${xml_FILE}) # Generate eem_db_impl.cpp/.h CODEGEN_DATABASE_SQL(SRCS_common ${xml_FILE}) # Generate *.cpp/*.hpp from idl 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 # _enums.hpp (RTIDDSGEN on _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 ${CMAKE_BINARY_DIR}/Lts/Services/ExerciseEventManagement/eem_enums.hpp COPYONLY ) ENDIF() # Generate eem_dt[s,c]_types.h, eem_ft[s,c]_types.h IF(BUILD_RTI) CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) ENDIF() # generate eem_[d|f]tc.h IF(BUILD_RTI) CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE} PARTS DTC) ENDIF() NGL_ADD_LIBRARY(AAR SV WS svcEemCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcEemCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) NGL_TARGET_LINK_LIBRARIES(svcEemCommon PRIVATE RTI::nddscpp2 PUBLIC Qt6::Core $,ddscore,> LtsCommandLineParser NGLLogger ngldb $,svcPdmCommon,> ) NGL_INSTALL_TARGET(svcEemCommon) # # --- Library svcEemClient -------------------------------------------------------------------------------- # SET(SRCS_client eem_export.h ) # generate eem_[d|f]tc.h, eem_[d|f]tc_impl.[cpp|h] IF(BUILD_RTI) CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE} PARTS DTC) ENDIF() NGL_ADD_LIBRARY(AAR SV WS svcEemClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcEemClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) NGL_TARGET_LINK_LIBRARIES(svcEemClient PRIVATE RTI::nddscpp2 $,ddsconnector,> PUBLIC svcEemCommon ddsftc ) NGL_INSTALL_TARGET(svcEemClient) # # --- Library svcEemServer -------------------------------------------------------------------------------- # SET(SRCS_server eem_export.h ) # generate eem_[d|f]ts.h, eem_[d|f]ts_impl.[cpp|h] IF(BUILD_RTI) CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE} PARTS DTS) ENDIF() NGL_ADD_LIBRARY(AAR SV svcEemServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcEemServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) NGL_TARGET_LINK_LIBRARIES(svcEemServer PRIVATE RTI::nddscpp2 $,ddsconnector,> ddsfts PUBLIC svcEemCommon ngldb ) NGL_INSTALL_TARGET(svcEemServer) # # --- Topic Type Plugin -------------------------------------------------------------- # IF(BUILD_RTI) CREATE_TOPIC_TYPE_PLUGIN(${xml_FILE}) ENDIF() # # --- Executable svcTimeLineManagement (sTLM) ------------------------------------------------- # SET(SRCS_exe main.cpp main_handler.cpp main_handler.h dds_handler.cpp dds_handler.h handler_dynamic_participant_data.cpp handler_dynamic_participant_data.h handler_equipment_error_registration.cpp handler_equipment_error_registration.h handler_participant_event.cpp handler_participant_event.h settings.cpp settings.h web_socket_avs.cpp web_socket_avs.h web_socket_server.cpp web_socket_server.h ${xml_FILE} ) # Generate eem.sql, eem.xml IF(BUILD_RTI) CODEGEN_SQL(SRCS_exe ${xml_FILE}) ENDIF() NGL_ADD_SVC_ICON(SRCS_exe) NGL_ADD_EXECUTABLE(AAR SV svcExerciseEventManagement ${SRCS_exe}) NGL_TARGET_LINK_LIBRARIES(svcExerciseEventManagement Qt6::Core svcAlmServer svcFltServer svcMrkServer svcEvlServer svcBldClient svcCesClient svcAesClient svcCoreClient svcEemCommon svcEemServer svcOssClient svcPpmClient svcAvmClient $,svcIsmCommon,> $,svcIsmClient,> svcPdmClient $,ddsconnector,> nglsettings ProjectConfig LtsCommandLineParser LtsUtilsCoreHeaderOnly NGLLogger nglcoreapplication ngltools ${Qt6_WebSockets} ) NGL_INSTALL_TARGET(svcExerciseEventManagement) NGL_INSTALL(AAR SV FILES log4cxx_eem.props DESTINATION bin) NGL_ADD_TARGET_LINK(svcExerciseEventManagement sEEM) # Uncomment if necessary #ADD_SUBDIRECTORY(UnitTests) ADD_SUBDIRECTORY(ModuleTests) ADD_SUBDIRECTORY(WebSocketServer)