Merge pull request #17028 from xipingyan:patch-1

* Update OpenCVFindVA_INTEL.cmake

When set env VA_INTEL_IOCL_ROOT, "if($ENV{VA_INTEL_IOCL_ROOT})" don't work.
    My modification as follow.
    
    -    if($ENV{VA_INTEL_IOCL_ROOT})
    +    if(DEFINED ENV{VA_INTEL_IOCL_ROOT})
    
    Refer: https://cmake.org/cmake/help/latest/variable/ENV.html

* based on merge comment, update code
This commit is contained in:
Xiping Yan 2020-04-10 20:23:13 +08:00 committed by GitHub
parent e1f14fcac7
commit 5c7c80dd27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,10 +5,9 @@
# VA_INTEL_IOCL_ROOT - root of Intel OCL installation
if(UNIX AND NOT ANDROID)
if($ENV{VA_INTEL_IOCL_ROOT})
set(VA_INTEL_IOCL_ROOT $ENV{VA_INTEL_IOCL_ROOT})
else()
set(VA_INTEL_IOCL_ROOT "/opt/intel/opencl")
ocv_check_environment_variables(VA_INTEL_IOCL_ROOT)
if(NOT DEFINED VA_INTEL_IOCL_ROOT)
set(VA_INTEL_IOCL_ROOT "/opt/intel/opencl")
endif()
find_path(