CMakeLists.txt 761 B

1234567891011121314151617181920212223242526
  1. ocv_install_example_src(tapi *.cpp *.hpp CMakeLists.txt)
  2. set(OPENCV_TAPI_SAMPLES_REQUIRED_DEPS
  3. opencv_core
  4. opencv_imgproc
  5. opencv_video
  6. opencv_imgcodecs
  7. opencv_videoio
  8. opencv_highgui
  9. opencv_objdetect
  10. opencv_features2d
  11. opencv_calib3d
  12. opencv_flann)
  13. ocv_check_dependencies(${OPENCV_TAPI_SAMPLES_REQUIRED_DEPS})
  14. if(NOT BUILD_EXAMPLES OR NOT OCV_DEPENDENCIES_FOUND)
  15. return()
  16. endif()
  17. project(tapi_samples)
  18. ocv_include_modules_recurse(${OPENCV_TAPI_SAMPLES_REQUIRED_DEPS})
  19. file(GLOB all_samples RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
  20. foreach(sample_filename ${all_samples})
  21. ocv_define_sample(tgt ${sample_filename} tapi)
  22. ocv_target_link_libraries(${tgt} PRIVATE ${OPENCV_LINKER_LIBS} ${OPENCV_TAPI_SAMPLES_REQUIRED_DEPS})
  23. endforeach()