#
# monitoring of the target areas
# $Id$
# $HeadURL$
# $Author$
#

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


SET(SRCS
  plugin.cpp
  plugin.h
  handler_geopairing.cpp
  handler_geopairing.h
  settings.cpp
  settings.h
  GeoPairing/GeoPairing.cpp
  GeoPairing/GeoPairing.hpp
  logger.cpp
  logger.h
  )

# 22.11.2024, Norbert Thoden
# cesPluginGeoPairing is a MODULE; not a SHARED
# So NGL_ADD_LIBRARY2 SHARED with would create ./Plugins/GeoPairing/cesplugingeopairing_export.h,
# but not with MODULE.
# But is an export macro realy needed? -> No
set(CMAKE_AUTOMOC ON)
NGL_ADD_LIBRARY(AAR SV cesPluginGeoPairing MODULE ${SRCS})
if(QT6_GUI_AVAILABLE)
  NGL_TARGET_LINK_LIBRARIES(cesPluginGeoPairing
    Qt6::Network
    ${Qt6_Widgets}
    cesPluginInterface
    ngldb
    svcCesDDSCommon
    # GeoParing stuff
    GBL_Types
    GBL_ConfigSystem
    FW_Ballistic
    svcCesGeoPairingImpl
    $<$<TARGET_EXISTS:Schusstafel::Schusstafel>:Schusstafel::Schusstafel>
  )
endif()
NGL_INSTALL_TARGET(cesPluginGeoPairing)

ADD_SUBDIRECTORY(GBL_Global)
ADD_SUBDIRECTORY(GBL_ConfigSystem)
ADD_SUBDIRECTORY(GBL_Types)
ADD_SUBDIRECTORY(FW_Ballistic)
ADD_SUBDIRECTORY(GeoPairingImpl)
ADD_SUBDIRECTORY(GeoPairing)
