#
# $Id$
# $HeadURL$
# $Author$
# Created by Malte Schroeder, SLSE, 2016-03-03
#

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


set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/ui)

SET(lt_SRCS
  licenceedit.cpp
  licenceedit.h
  mainwindow.cpp
  mainwindow.h
  main.cpp
  sortfilter.cpp
  sortfilter.h
)

NGL_WRAP_UI(lt_SRCS ui/mainwindow.ui ui/licenceedit.ui)

NGL_ADD_EXECUTABLE(WS NO_TRANSLATION LicenceEditor ${lt_SRCS})

if(QT6_GUI_AVAILABLE)
  NGL_TARGET_LINK_LIBRARIES(LicenceEditor
    ${Qt6_Widgets}
    Qt6::Core
    Qt6::Xml
    nglapplication
    nglwidgets
    LtsLicence
    NGLLogger
  )
endif()

NGL_INSTALL_TARGET_DEVEL(LicenceEditor)

