INCLUDE(ve_plugin)
INCLUDE(admCheckAom)

checkAomEnc()

IF (USE_AOM_ENC)
  SET(av1AomEnc_SRCS
        ADM_av1AomEnc.cpp
        ADM_av1AomEncPlugin.cpp
        ADM_av1AomEncDialog.cpp
    )

  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
  INCLUDE_DIRECTORIES(${AOM_INCLUDEDIR})

  SET(PLUGIN_LIBNAME "ADM_ve_av1aom")
  ADD_VIDEO_ENCODER(${PLUGIN_LIBNAME} ${av1AomEnc_SRCS})
  ADD_DEFINITIONS(${AOM_CFLAGS})
  TARGET_LINK_LIBRARIES(${PLUGIN_LIBNAME} PRIVATE ${AOM_LDFLAGS})
  INIT_VIDEO_ENCODER(${PLUGIN_LIBNAME})
  INSTALL_VIDEO_ENCODER(${PLUGIN_LIBNAME})
ELSE (USE_AOM_ENC)
  MESSAGE(STATUS "libaom AV1 encoder plugin disabled.")
ENDIF (USE_AOM_ENC)
