#
# $Id$
# $HeadURL$
# $Author$
# Created by Christian Ehrlicher, SLSE, 2016-02-29
#

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


SET(whm_gui_SRCS
  whm_gui_plugin.cpp
  whm_gui_plugin.h

  CustomViews/whm_injury_model.cpp
  CustomViews/whm_injury_model.h
  injury_model_edit_dialog.cpp
  injury_model_edit_dialog.h
  injury_model_list.cpp
  injury_model_list.h
  injury_model_model.cpp
  injury_model_model.h
  injury_model_add.cpp
  injury_model_add.h

  CustomViews/whm_equipment_type.cpp
  CustomViews/whm_equipment_type.h
  equipment_type_edit_dialog.cpp
  equipment_type_edit_dialog.h
  equipment_type_list.cpp
  equipment_type_list.h
  equipment_type_model.cpp
  equipment_type_model.h
  equipment_type_add.cpp
  equipment_type_add.h
)

NGL_WRAP_UI(whm_gui_SRCS
  CustomViews/whm_injury_model.ui
  injury_model_edit_dialog.ui
  injury_model_list.ui
  injury_model_add.ui

  CustomViews/whm_equipment_type.ui
  equipment_type_edit_dialog.ui
  equipment_type_list.ui
  equipment_type_add.ui
)
  
NGL_ADD_LIBRARY(WS WhmGuiPlugin MODULE ${whm_gui_SRCS})

if(QT6_GUI_AVAILABLE)
  NGL_TARGET_LINK_LIBRARIES(WhmGuiPlugin
    NGLLogger
    nglwidgets
    WhmDataPluginInterface
    WhmGuiPluginInterface
    ExmDataPluginInterface
    ${Qt6_Widgets}
    LtsWidgets
    LtsSession
    LtsSessionData
    LtsSessionDataDds
    LtsDataView
    LtsUtilsGuiDds
    LtsPrinting
    $<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
    svcWhgCommon
  )
endif()

NGL_INSTALL_TARGET(WhmGuiPlugin)


