#
# $Id$
# $HeadURL$
# $Author$
# Created by Norbert Thoden, NLE, 2020-05-28
#

# Make ${Qt6_Widgets} optional
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
  set(Qt6_Widgets ${Qt6_Widgets})
else()
  set(Qt6_Widgets "")
endif()


SET(tgt_gui_SRCS
  # common
  tgt_target_gui_plugin.cpp
  tgt_target_gui_plugin.h
  tgt_telegrams.cpp
  tgt_telegrams.h
  tgt_common.cpp
  tgt_common.h

  # target
  tgt_participant_handler.cpp
  tgt_participant_handler.h
  tgt_target_part_model.cpp
  tgt_target_part_model.h
  tgt_target_part_dialog.cpp
  tgt_target_part_dialog.h
  tgt_shootback_target_edit.cpp
  tgt_shootback_target_edit.h

  # assignment
  tgt_assignment_part_model.cpp
  tgt_assignment_part_model.h
  tgt_target_area_assignment_dialog.cpp
  tgt_target_area_assignment_dialog.h
  tgt_target_area_assignment_edit.cpp
  tgt_target_area_assignment_edit.h

  # area
  tgt_area_dialog.cpp
  tgt_area_dialog.h
  tgt_area_edit.cpp
  tgt_area_edit.h
  tgt_area_model.cpp
  tgt_area_model.h

  )

NGL_WRAP_UI(tgt_gui_SRCS
  tgt_shootback_target_edit.ui
  tgt_target_part_dialog.ui
  tgt_target_area_assignment_dialog.ui
  tgt_target_area_assignment_edit.ui
  tgt_area_dialog.ui
  tgt_area_edit.ui
)

NGL_ADD_LIBRARY(WS TgtTargetGuiPlugin MODULE ${tgt_gui_SRCS})
if(QT6_GUI_AVAILABLE)
  NGL_TARGET_LINK_LIBRARIES(TgtTargetGuiPlugin
    NGLLogger
    LtsPrinting
    LtsSession
  
    svcTgtClient
    ${Qt6_Widgets}
    LtsCoordTrans
    ltsCoordWidget
    LtsWidgets
    LtsDataView
    LtsSessionData
    LtsUtilsCore
    LtsUtilsGuiDds
    LtsUtilsSettings
  
    advancedSymbology
    FlmDataPluginInterface  #flm_translation
  
    PpmGuiComboboxPluginInterface
    svcExmCommon
    svcPpmCommon
  )
endif()

NGL_INSTALL_TARGET(TgtTargetGuiPlugin)
