#
# $Id: CMakeLists.txt 63121 2024-06-21 07:06:23Z karwat $
# $HeadURL: svn://slssvn/TDS/branches/product/features/24_adler/Lts/Plugins/AreaEffectSimulation/Gui/Explosion/CMakeLists.txt $
# $Author: karwat $
# Created by Christian Ehrlicher, SLSE, 2016-02-29
#

#
# LIBRARY for AesEffectClusterModel (which is used at AirSupportPlugin)
#
# Build the targets in this directory as separate translation units (NOT a unity
# build). aes_explosions_edit_adler.cpp and
# aes_explosions_edit_adler_standalone.cpp each define the same file-scope statics
# (VALUE_VALID_PROPERTY_NAME / LAST_VALUE / s_timeUntilMinimumSec, internal linkage,
# both in namespace AreaEffectSimulation). Separate TUs keep the copies independent
# (legacy structure); a unity TU sees two definitions in one scope and fails with
# "redefinition of '... AreaEffectSimulation::...'" (behavior-neutral to disable).
set(CMAKE_UNITY_BUILD FALSE)

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


SET(AesEffectCluster_SRCS
    aes_effect_cluster_model.cpp
    aes_effect_cluster_model.h
    aes_effector.h
    aes_effector.cpp
    aes_effector.ui
    )

NGL_ADD_LIBRARY2(WS AesEffectClusterModel SHARED ${AesEffectCluster_SRCS})

NGL_TARGET_LINK_LIBRARIES(AesEffectClusterModel
  PRIVATE
    AesBaseGui
    svcAesClient
    ngltools
  PUBLIC
    NGLLogger
    Qt6::Core
)

NGL_TARGET_INCLUDE_DIRECTORIES(AesEffectClusterModel
  INTERFACE
    ${CMAKE_CURRENT_SOURCE_DIR}/..
)

NGL_INSTALL_TARGET(AesEffectClusterModel)


##
##
##
ADD_INTERFACE_LIBRARY(
  AesExplosionGuiPluginInterface
  ${CMAKE_CURRENT_SOURCE_DIR}/aes_explosion_gui_plugin_interface.h
  ${CMAKE_CURRENT_SOURCE_DIR}/..
  PdmDataPluginInterface
)

SET(aes_explosion_gui_SRCS
  aes_explosion_gui_plugin.cpp
  aes_explosion_gui_plugin.h
  aes_explosion_edit.cpp
  aes_explosion_edit.h
  aes_explosions_edit.cpp
  aes_explosions_edit.h
  aes_explosions_edit_adler.cpp
  aes_explosions_edit_adler.h
  aes_explosions_edit_adler_standalone.cpp
  aes_explosions_edit_adler_standalone.h
  aes_explosion_list.cpp
  aes_explosion_list.h
  aes_explosions_area_model.cpp
  aes_explosions_area_model.h
#  aes_effect_cluster_model.cpp
#  aes_effect_cluster_model.h
  aes_explosions_single_model.cpp
  aes_explosions_single_model.h
  aes_effector.cpp
  aes_effector.h
  aes_rocket_utility.cpp
  aes_rocket_utility.h
  CustomView/aes_explosion.h
  CustomView/aes_explosion.cpp
)

NGL_WRAP_UI(aes_explosion_gui_SRCS
  aes_explosion_edit.ui
  aes_explosions_edit.ui
  aes_explosions_edit_adler.ui
  aes_explosions_edit_adler_standalone.ui
  aes_effector.ui
  CustomView/aes_explosion.ui
)

NGL_ADD_LIBRARY(WS AesExplosionGuiPlugin MODULE ${aes_explosion_gui_SRCS})
if(QT6_GUI_AVAILABLE)
  NGL_TARGET_LINK_LIBRARIES(AesExplosionGuiPlugin
    AesBaseGui
    ngltools
    NGLLogger
    LtsSessionData
    AesDataPluginInterface
    AesExplosionGuiPluginInterface
    AesEffectClusterModel
    PdmGuiPluginInterface
    PpmDataPluginInterface
    PpmParticipantSelectionGui
    SituationMapGuiPluginInterface
  
    ${Qt6_Widgets}
    LtsWidgets
    LtsDataView
    LtsUtilsGuiDds
    LtsUtilsCore
    LtsUtilsSettings
  
    LtsElevation
    Trajectory
    LtsSessionData
    AsmDataPluginInterface
    ExmDataPluginInterface
    saaTelegrams
  )
endif()

NGL_INSTALL_TARGET(AesExplosionGuiPlugin)


