CMakeLists.txt 767 B

12345678910111213141516171819202122
  1. ocv_install_example_src(directx *.cpp *.hpp CMakeLists.txt)
  2. set(OPENCV_DIRECTX_SAMPLES_REQUIRED_DEPS
  3. opencv_core
  4. opencv_imgproc
  5. opencv_imgcodecs
  6. opencv_videoio
  7. opencv_highgui)
  8. ocv_check_dependencies(${OPENCV_DIRECTX_SAMPLES_REQUIRED_DEPS})
  9. if(NOT BUILD_EXAMPLES OR NOT OCV_DEPENDENCIES_FOUND)
  10. return()
  11. endif()
  12. project("directx_samples")
  13. ocv_include_modules_recurse(${tgt} ${OPENCV_DIRECTX_SAMPLES_REQUIRED_DEPS})
  14. file(GLOB all_samples RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
  15. foreach(sample_filename ${all_samples})
  16. ocv_define_sample(tgt ${sample_filename} directx)
  17. ocv_target_link_libraries(${tgt} PRIVATE ${OPENCV_LINKER_LIBS} ${OPENCV_DIRECTX_SAMPLES_REQUIRED_DEPS})
  18. ocv_target_link_libraries(${tgt} PRIVATE "gdi32")
  19. endforeach()