#
# $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()


SET(SRCS_IMPORT_BUILDINGS
  ism_import_buildings.cpp
  ism_import_buildings.h
)
NGL_ADD_EXECUTABLE(AAR SV WS ismImportBuildings ${SRCS_IMPORT_BUILDINGS})
NGL_TARGET_LINK_LIBRARIES(ismImportBuildings
  Qt6::Core
  RTI::nddscpp2
  $<IF:$<TARGET_EXISTS:svcIsmClient>,svcIsmClient,>
  LtsCommandLineParser
  $<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
  nglcoreapplication
  LtsUtilsCoreHeaderOnly
  ${Qt6_WebSockets}
)
NGL_INSTALL_TARGET(ismImportBuildings)

