#
# $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(ppm_combobox_gui_SRCS
  ppm_combobox_foreign_gui_interface_impl.cpp
  ppm_combobox_foreign_gui_interface_impl.h
  ppm_combobox.cpp
  ppm_combobox.h
  ppm_party_selector.cpp
  ppm_party_selector.h
)
NGL_WRAP_UI(ppm_combobox_gui_SRCS ppm_party_selector.ui)
NGL_ADD_LIBRARY(WS PpmComboBoxGui STATIC ${ppm_combobox_gui_SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(PpmComboBoxGui
  PUBLIC
    ${CMAKE_CURRENT_SOURCE_DIR}/../../..
)
NGL_TARGET_LINK_LIBRARIES(PpmComboBoxGui
  PRIVATE
    LtsWidgets
  PUBLIC
    LtsSession
    PpmGuiComboboxPluginInterface
    Qt6::Core
    svcPpmClient
)

SET(ppm_combobox_gui_plugin_SRCS
  ppm_combobox_gui_plugin.cpp
  ppm_combobox_gui_plugin.h
)
NGL_ADD_LIBRARY(WS PpmComboBoxGuiPlugin MODULE ${ppm_combobox_gui_plugin_SRCS})
NGL_TARGET_LINK_LIBRARIES(PpmComboBoxGuiPlugin
  LtsSessionData
  NGLLogger
  PpmComboBoxGui
  PpmDataPluginInterface
)

NGL_INSTALL_TARGET(PpmComboBoxGuiPlugin)
