CMakeLists.txt 805 B

12345678910111213141516171819202122232425
  1. ocv_install_example_src(cpp *.cpp *.hpp CMakeLists.txt)
  2. cmake_minimum_required(VERSION 2.8.9)
  3. set(OPENCV_OPENVX_SAMPLE_REQUIRED_DEPS
  4. opencv_core
  5. opencv_imgproc
  6. opencv_imgcodecs
  7. opencv_videoio
  8. opencv_highgui)
  9. ocv_check_dependencies(${OPENCV_OPENVX_SAMPLE_REQUIRED_DEPS})
  10. if(NOT BUILD_EXAMPLES OR NOT OCV_DEPENDENCIES_FOUND)
  11. return()
  12. endif()
  13. project(openvx_samples)
  14. ocv_include_modules_recurse(${OPENCV_OPENVX_SAMPLE_REQUIRED_DEPS})
  15. add_definitions(-DIVX_USE_OPENCV)
  16. add_definitions(-DIVX_HIDE_INFO_WARNINGS)
  17. file(GLOB_RECURSE cpp_samples RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
  18. foreach(sample_filename ${cpp_samples})
  19. ocv_define_sample(tgt ${sample_filename} openvx)
  20. ocv_target_link_libraries(${tgt} PRIVATE ${OPENCV_LINKER_LIBS} ${OPENCV_OPENVX_SAMPLE_REQUIRED_DEPS})
  21. endforeach()