#
# $Id$
# $HeadURL$
# $Author$
# Created by Filip Biedziak, NLE, 2020-08-14
#

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


SET(efm_sound_area_gui_SRCS
  efm_sound_area_gui_plugin.cpp
  efm_sound_area_gui_plugin.h

  efm_sound_area.h

  efm_sound_state.cpp
  efm_sound_state.h

  efm_sound_area_select_dialog.cpp
  efm_sound_area_select_dialog.h
  efm_sound_area_edit_dialog.cpp
  efm_sound_area_edit_dialog.h

  efm_sound_area_select_model.cpp
  efm_sound_area_select_model.h
  efm_sound_area_edit_model_playlist.cpp
  efm_sound_area_edit_model_playlist.h
  efm_sound_area_edit_model_tree.cpp
  efm_sound_area_edit_model_tree.h

  efm_sound_area_helper.cpp
  efm_sound_area_helper.h

  efm_switch_item_delegate.cpp
  efm_switch_item_delegate.h

  ../logger.cpp
  ../logger.h
)

NGL_WRAP_UI(efm_sound_area_gui_SRCS
  efm_sound_area_select_dialog.ui
  efm_sound_area_edit_dialog.ui
  #efm_sound_area_add_sound_process_dialog.ui
)

NGL_ADD_LIBRARY(WS EfmSoundAreaGuiPlugin MODULE ${efm_sound_area_gui_SRCS})
if(QT6_GUI_AVAILABLE)
  NGL_TARGET_LINK_LIBRARIES(EfmSoundAreaGuiPlugin
    ngltools
    LtsSession
    LtsWidgets
    IsmDataPluginInterface
    EfmDataPluginInterface
    EfmGuiPluginInterface
    ${Qt6_Widgets}
    LtsUtilsGuiDds
  )
endif()
NGL_INSTALL_TARGET(EfmSoundAreaGuiPlugin)
