#
# $Id$
# $HeadURL$
# $Author$
# Created by Hanna Rathje, SLTE, 2022-03-29
#

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


SET(SRCS
  main.cpp
  mainwindow.h
  mainwindow.cpp
  position_helper.h
  position_helper.cpp
  settings.h
  settings.cpp
  simulated_player.h
  simulated_player.cpp
  worker.h
  worker.cpp
)

NGL_WRAP_UI(SRCS mainwindow.ui )

NGL_ADD_EXECUTABLE(TOOLSSV wlsRandomPositions ${SRCS})
if(QT6_GUI_AVAILABLE)
  NGL_TARGET_LINK_LIBRARIES(wlsRandomPositions
    ${Qt6_Widgets}
    Qt6::Core
    Qt6::Network
    LtsCommandLineParser
    LtsWidgets
    ltsCoordWidget
    LtsCoordTrans
    LtsUtilsCore
    SfmConverter
    nglapplication
    nglsettings
    ngltools
    NGLLogger
  )
endif()

NGL_INSTALL_TARGET(wlsRandomPositions)
NGL_INSTALL(TOOLSSV FILES log4cxx_wrp.props wrp_data.ini DESTINATION bin)

