#
# $Id$
# $HeadURL$
# $Author$
#

IF(BUILD_RTI)

SET(SRCS
  DDS_DefaultQos.h
  DDS_DefaultQos.cpp
)

IF(TABLET_MODE)
  NGL_INSTALL(WS AAR HLA SV FILES "default_profile_tablet.xml" DESTINATION "./share/Lts/DDS" RENAME "default_profile.xml")
  NGL_INSTALL(WS AAR HLA SV FILES "default_profile.xml" DESTINATION "./share/Lts/DDS" RENAME "default_profile_ws.xml")
ELSE()
INSTALL_SHARED_FILES(SRCS
  FILES "default_profile.xml"
  DESTINATION "DDS"
  SV WS AAR HLA
)
ENDIF()
NGL_ADD_LIBRARY2(AAR SV HLA WS ddsQoS SHARED ${SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(ddsQoS
  INTERFACE
    ${CMAKE_CURRENT_SOURCE_DIR}/../../
    # Consumers (the generated *_topic_type_plugin.cpp) include
    # DDS_DefaultQos.h -> ddsqos_export.h; the export header is generated
    # into the binary dir, so export it the same way ddsfts exports its
    # ddsfts_export.h. Without this every <svc>TopicTypePlugin target fails
    # to compile ("ddsqos_export.h: No such file or directory").
    ${CMAKE_CURRENT_BINARY_DIR}
)
NGL_TARGET_LINK_LIBRARIES(ddsQoS
  PRIVATE
    RTI::nddsc
    RTI::nddscpp2
    NGLLogger
    ngltools
  PUBLIC
    Qt6::Core
)

ENDIF(BUILD_RTI)

#
# Unit tests
#
ADD_SUBDIRECTORY(unit-test)
