Merge pull request #22712 from dmatveev:dm/fix_va_headers

pull/22718/head
Alexander Alekhin 2 years ago
commit 1293e99ad8
  1. 21
      modules/gapi/CMakeLists.txt

@ -328,18 +328,13 @@ if(HAVE_GAPI_ONEVPL)
ocv_target_include_directories(${the_module} SYSTEM PRIVATE ${OPENCL_INCLUDE_DIRS})
endif()
if(UNIX)
if(WITH_VA)
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindVA.cmake")
if(VA_INCLUDE_DIR)
ocv_target_include_directories(${the_module} SYSTEM PRIVATE ${VA_INCLUDE_DIR})
ocv_target_include_directories(opencv_test_gapi SYSTEM PRIVATE ${VA_INCLUDE_DIR})
ocv_target_link_libraries(${the_module} PRIVATE ${VA_LIBRARIES})
ocv_target_link_libraries(opencv_test_gapi PRIVATE ${VA_LIBRARIES})
endif()
else(WITH_VA)
message(FATAL_ERROR "libva not found: building HAVE_GAPI_ONEVPL without libVA support is impossible on UNIX systems")
endif(WITH_VA)
if(UNIX AND HAVE_VA)
ocv_target_include_directories(${the_module} SYSTEM PRIVATE ${VA_INCLUDE_DIR})
ocv_target_link_libraries(${the_module} PRIVATE ${VA_LIBRARIES})
if(TARGET opencv_test_gapi)
ocv_target_include_directories(opencv_test_gapi SYSTEM PRIVATE ${VA_INCLUDE_DIR})
ocv_target_link_libraries(opencv_test_gapi PRIVATE ${VA_LIBRARIES})
endif()
endif()
endif()
@ -382,7 +377,7 @@ if(TARGET example_gapi_onevpl_infer_single_roi)
if(HAVE_D3D11 AND HAVE_OPENCL)
ocv_target_include_directories(example_gapi_onevpl_infer_single_roi SYSTEM PRIVATE ${OPENCL_INCLUDE_DIRS})
endif()
if(WITH_VA AND UNIX)
if(UNIX AND HAVE_VA)
message ("GAPI VPL samples with VAAPI")
ocv_target_include_directories(example_gapi_onevpl_infer_single_roi SYSTEM PRIVATE ${VA_INCLUDE_DIR})
ocv_target_link_libraries(example_gapi_onevpl_infer_single_roi PRIVATE ${VA_LIBRARIES})

Loading…
Cancel
Save