
if(NOT ENABLE_GUI)
  return()
endif()

option(BUILD_CAMERA_IMAGE_OVERLAY_SAMPLE "Building a sample of overlaying a camea image" OFF)

if(BUILD_CAMERA_IMAGE_OVERLAY_SAMPLE)
  pkg_check_modules(OPENCV opencv)
  if(OPENCV_FOUND)
    include_directories(${OPENCV_INCLUDE_DIRS})
    set(target CnoidCameraImageOverlayPlugin)
    add_cnoid_plugin(${target} SHARED CameraImageOverlayPlugin.cpp)
    target_link_libraries(${target} CnoidBase ${OPENCV_LIBRARIES})
    apply_common_setting_for_plugin(${target})
  endif()
endif()
