#
# $Id$
# $HeadURL$
# $Author$
#
# Created by Mike Wille, SLSE, 2017-03-21
#

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


SET(pre_common_SRCS
  topic_assignment.h
  pre_model.h
  pre_model.cpp
  pre_mobile_model.h
  pre_mobile_model.cpp
  pre_edit_dialog.h
  pre_edit_dialog.cpp
  toolz.h
  toolz.cpp
)

NGL_WRAP_UI(pre_common_SRCS
  pre_edit_dialog.ui
)

NGL_ADD_LIBRARY2(WS PreGuiCommon SHARED ${pre_common_SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(PreGuiCommon
  PUBLIC
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../include/Services/PresentationManagement
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../../Common/LtsUtils
    ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../include
)
if(QT6_GUI_AVAILABLE)
  NGL_TARGET_LINK_LIBRARIES(PreGuiCommon
    Qt6::Core
    ${Qt6_Widgets}
    PreDataPluginInterface
    NGLLogger
    LtsUtilsGuiDds
    LtsSession
    LtsSessionData
    LtsScriptTimeline
    TopicReplayInterface
    ngltools
    OpmDataPluginInterface
  )
endif()

