Skip to content

Commit

Permalink
Merge pull request opencv#14294 from alalek:issue_14286
Browse files Browse the repository at this point in the history
cmake: fix WITH_OPENCL_D3D11_NV check
  • Loading branch information
alalek authored Apr 11, 2019
1 parent 7621b91 commit 39630e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions cmake/OpenCVDetectDirectX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ if(WIN32)
set(HAVE_D3D11 ON)
set(HAVE_D3D10 ON)
set(HAVE_D3D9 ON)

if(HAVE_OPENCL AND WITH_OPENCL_D3D11_NV AND EXISTS "${OPENCL_INCLUDE_DIR}/CL/cl_d3d11_ext.h")
set(HAVE_OPENCL_D3D11_NV ON)
endif()

endif()
7 changes: 3 additions & 4 deletions cmake/OpenCVDetectOpenCL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ mark_as_advanced(OPENCL_INCLUDE_DIR OPENCL_LIBRARY)

if(OPENCL_FOUND)

if(WITH_OPENCL_D3D11_NV AND EXISTS "${OPENCL_INCLUDE_DIR}/CL/cl_d3d11_ext.h")
set(HAVE_OPENCL_D3D11_NV ON)
endif()

if(OPENCL_LIBRARY)
set(HAVE_OPENCL_STATIC ON)
set(OPENCL_LIBRARIES "${OPENCL_LIBRARY}")
Expand Down Expand Up @@ -82,4 +78,7 @@ if(OPENCL_FOUND)
list(APPEND OPENCL_INCLUDE_DIRS "${CLAMDBLAS_INCLUDE_DIR}")
endif()
endif()

# check WITH_OPENCL_D3D11_NV is located in OpenCVDetectDirectX.cmake file

endif()

0 comments on commit 39630e0

Please sign in to comment.