#
# Exported scripts management for uploading, downloading and removing exported scripts
#
# $Id: CMakeLists.txt 51804 2020-07-31 04:47:28Z fritsche_h $
# $HeadURL: svn://slssvn/TDS/branches/product/iterations/21_03_salted_caramel/Lts/Plugins/TakeHomePackageManager/CMakeLists.txt $
# $Author: fritsche_h $
#
# Created by Mike Wille, SLTE, 2020-03-23
#

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

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


SET(src
  tpm2_gui_plugin.cpp
  tpm2_gui_plugin.h
  tpm2_exported_scripts_dialog.cpp
  tpm2_exported_scripts_dialog.h
  logger.cpp
  logger.h
)

QT5_WRAP_UI(src
  tpm2_exported_scripts_dialog.ui
)

NGL_ADD_LIBRARY2(WS Thp2ManagementGuiPlugin MODULE ${src})
NGL_TARGET_COMPILE_DEFINITIONS(Thp2ManagementGuiPlugin PRIVATE L=QStringLiteral)
if(QT6_GUI_AVAILABLE)
  NGL_TARGET_LINK_LIBRARIES(Thp2ManagementGuiPlugin
    Thp2Common
    Thp2CommonCore
    Tpm2GuiPluginInterface
    ${Qt6_Widgets}
    Qt6::Network
    ${Qt6_WebSockets} # get live changes from the server
    NGLLogger
    LtsWidgets
    LtsSession
    LtsDataView
    nglcompression # tar
    nglsettings # windoze / OC thp server hostname
    ngltools # NGL::Connections::eConnection and findProjectConfigFile
    #AsmDataPluginInterface
    #ExmDataPluginInterface
    LtsSessionData
    #httq
  )
endif()

NGL_INSTALL_TARGET(Thp2ManagementGuiPlugin)

