#
# $Id$
# $HeadURL$
# $Author$
# Created by Mike Wille, SLSE, 2016-05-05
#

# Build this target as separate translation units (NOT a unity build). It links the
# ddsftc INTERFACE target, which propagates generic_ftc.cpp /
# generic_ftc_threading.cpp as INTERFACE sources (legacy design: consumers compile
# the generic FTC implementation themselves, one TU per file, hidden visibility).
# A unity build concatenates those .cpp's into this target's single TU, and LTO
# (USE_IPO) then reports "multiple definition of Threading::..." from the same
# object. Separate TUs restore the legacy per-file structure (behavior-neutral).
set(CMAKE_UNITY_BUILD FALSE)

SET(esm_combobox_gui_SRCS
  esm_combobox_foreign_gui_interface_impl.cpp
  esm_combobox_foreign_gui_interface_impl.h
  esm_combobox.cpp
  esm_combobox.h
)
NGL_WRAP_UI(esm_combobox_gui_SRCS )
NGL_ADD_LIBRARY(WS EsmComboBoxGui STATIC ${esm_combobox_gui_SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(EsmComboBoxGui
  PUBLIC
    ${CMAKE_CURRENT_SOURCE_DIR}/../../..
    ${CMAKE_BINARY_DIR}/Lts/Common/LtsCoordTrans
)
NGL_TARGET_LINK_LIBRARIES(EsmComboBoxGui
  PRIVATE
    LtsWidgets
  PUBLIC
    LtsSession
    EsmGuiComboboxPluginInterface
    Qt6::Core
    svcEsmClient
    svcPpmClient
    svcAesClient
)

SET(esm_combobox_gui_plugin_SRCS
  esm_combobox_gui_plugin.cpp
  esm_combobox_gui_plugin.h
)
NGL_ADD_LIBRARY(WS EsmComboBoxGuiPlugin MODULE ${esm_combobox_gui_plugin_SRCS})
NGL_TARGET_LINK_LIBRARIES(EsmComboBoxGuiPlugin
  LtsSessionData
  NGLLogger
  EsmComboBoxGui
  EsmDataPluginInterface
)

NGL_INSTALL_TARGET(EsmComboBoxGuiPlugin)
