include(plugin_qt4)
include(admAsNeeded)
include(admOpenGl)
include(admPluginLocation)
MACRO(INIT_VIDEO_FILTER_GLQT4  lib  _srcsQt _headersQt _srcQt_ui  )
  ADD_LIBRARY(${lib} SHARED ${ARGN} ${_srcsQt})
  ADM_ADD_QT_INCLUDE_DIR(${QT_EXTENSION} ADM_openGL)
  ADM_ADD_QT_INCLUDE_DIR(${QT_EXTENSION} ADM_UIs)
  IF("${_srcQt_ui}" STREQUAL "")
    # No ui file
  ELSE()
    ADM_QT_WRAP_UI(qt4_ui ${_srcQt_ui}.ui)
  ENDIF()
  ADM_QT_WRAP_CPP(qt4_cpp ${_headersQt})

  TARGET_SOURCES(${lib} PRIVATE ${qt4_cpp} ${qt4_ui})
  AS_NEEDED(${lib})
  ADM_TARGET_NO_EXCEPTION(${lib})
  TARGET_COMPILE_DEFINITIONS(${lib} PRIVATE "ADM_UI_TYPE_BUILD=4")
  TARGET_LINK_LIBRARIES( ${lib} PRIVATE ADM_UI${QT_LIBRARY_EXTENSION}6  ADM_render6_${QT_LIBRARY_EXTENSION} adm_pthread)
  ADM_OPEN_GL(${lib})
  INIT_VIDEO_FILTER_INTERNAL(${lib})
  INSTALL_VIDEO_FILTER_INTERNAL(${lib} ${QT_EXTENSION})
ENDMACRO()
