#
# $Id$
# $HeadURL$
# $Author$
# Created by Patric Karwat, SLSE, 2016-10-05
#

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


SET(alm_emergency_call_gui_SRCS

  alm_emergency_call_gui_plugin.cpp
  alm_emergency_call_gui_plugin.h
  alm_emergency_call_dialog.cpp
  alm_emergency_call_dialog.h
  alm_emergency_call_model.cpp
  alm_emergency_call_model.h
  alm_emergency_call_info_dialog.cpp
  alm_emergency_call_info_dialog.h
)

NGL_WRAP_UI(alm_emergency_call_gui_SRCS
  alm_emergency_call_dialog.ui
  alm_emergency_call_info_dialog.ui
)

NGL_ADD_LIBRARY(WS AlmEmergencyCallGuiPlugin MODULE ${alm_emergency_call_gui_SRCS})
if(QT6_GUI_AVAILABLE)
  NGL_TARGET_LINK_LIBRARIES(AlmEmergencyCallGuiPlugin
    LtsPrinting
    AlmCommon
    svcTabCommon
    LtsSession
    LtsSessionData
    LtsUtilsSettings
    #AlmGuiPluginInterface
    AlmInfoGuiPluginInterface
    AlmDataPluginInterface
    OpmDataPluginInterface
    ExmDataPluginInterface
    #svcPdmCommon  # pdm_enums.h in alm_dialog.cpp
    #svcPpmCommon
    GuiPluginInterface
    ${Qt6_Widgets}
    LtsCoordTrans
    LtsWidgets
    LtsDataView
    SituationMapGuiPluginInterface
    NGLLogger
    LtsUtilsGuiDds
    LtsAppManager # get sessions to look on which one to open alarm history
  )
endif()

NGL_INSTALL_TARGET(AlmEmergencyCallGuiPlugin)
