INCLUDE(plugin_qt4)
INCLUDE(admAsNeeded)
INCLUDE(admPluginLocation)

MACRO(INIT_VIDEO_FILTER_QT4  lib  _srcsQt _headersQt _srcQt_ui  )
  IF(DO_QT4)
    ADM_ADD_SHARED_LIBRARY(${lib} ${ARGN} ${_srcsQt})
    TARGET_INCLUDE_DIRECTORIES(${lib} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${QT_INCLUDE_DIR} ${QT_INCLUDES})
    ADM_ADD_QT_INCLUDE_DIR(${QT_EXTENSION} ADM_UIs)
    ADM_QT_WRAP_UI(qt4_ui ${_srcQt_ui}.ui)
    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)
    TARGET_LINK_LIBRARIES(${lib} PRIVATE ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY})
    INIT_VIDEO_FILTER_INTERNAL(${lib})
    INSTALL_VIDEO_FILTER_INTERNAL(${lib} ${QT_EXTENSION})
  ENDIF()
ENDMACRO()
