detect_msmf.cmake 531 B

12345678910111213141516171819202122
  1. # --- VideoInput/Microsoft Media Foundation ---
  2. if(NOT HAVE_MSMF)
  3. check_include_file(mfapi.h HAVE_MFAPI)
  4. if(HAVE_MFAPI)
  5. set(HAVE_MSMF TRUE)
  6. endif()
  7. endif()
  8. if(HAVE_MSMF)
  9. if(WITH_MSMF_DXVA)
  10. check_include_file(d3d11.h HAVE_D3D11)
  11. check_include_file(d3d11_4.h HAVE_D3D11_4)
  12. if(HAVE_D3D11 AND HAVE_D3D11_4)
  13. set(HAVE_MSMF_DXVA TRUE)
  14. endif()
  15. endif()
  16. set(defs "HAVE_MSMF")
  17. if(HAVE_MSMF_DXVA)
  18. list(APPEND defs "HAVE_MSMF_DXVA")
  19. endif()
  20. ocv_add_external_target(msmf "" "" "${defs}")
  21. endif()