# let's put most of the "meat" in a static library this way, we can also unit
# test parts of it
add_library(gpgpass_internal STATIC)

target_sources(
  gpgpass_internal
  PRIVATE
          addfileinfoproxy.h
          clipboardhelper.h
          configdialog.h
          deselectabletreeview.h
          filecontent.h
          firsttimedialog.h
          gpgmehelpers.h
          mainwindow.h
          pass.h
          passwordconfiguration.h
          passworddialog.h
          passwordgenerator.h
          qpushbuttonfactory.h
          settings.h
          storemodel.h
          userinfo.h
          usersdialog.h
          userslistmodel.cpp
          util.h
          welcomewidget.h
          addfileinfoproxy.cpp
          clipboardhelper.cpp
          configdialog.cpp
          filecontent.cpp
          firsttimedialog.cpp
          mainwindow.cpp
          pass.cpp
          passwordgenerator.cpp
          passworddialog.cpp
          settings.cpp
          storemodel.cpp
          usersdialog.cpp
          userslistmodel.cpp
          util.cpp
          welcomewidget.cpp
          ../resources.qrc
	  )

ki18n_wrap_ui(gpgpass_internal
          mainwindow.ui
          configdialog.ui
          usersdialog.ui
          passworddialog.ui
          userswidget.ui
          welcomewidget.ui
	  )

target_link_libraries(gpgpass_internal
    Qt::Widgets
    KF${QT_MAJOR_VERSION}::Prison
    KF${QT_MAJOR_VERSION}::IconThemes
    KF${QT_MAJOR_VERSION}::I18n
    KF${QT_MAJOR_VERSION}::WidgetsAddons
    KF${QT_MAJOR_VERSION}::ItemModels
)

if (QT_MAJOR_VERSION STREQUAL "6")
    target_link_libraries(gpgpass_internal QGpgmeQt6)
else()
    target_link_libraries(gpgpass_internal QGpgme)
endif()
