Skip to content

Commit 39630e0

Browse files
authored
Merge pull request opencv#14294 from alalek:issue_14286
cmake: fix WITH_OPENCL_D3D11_NV check
1 parent 7621b91 commit 39630e0

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

cmake/OpenCVDetectDirectX.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,9 @@ if(WIN32)
2222
set(HAVE_D3D11 ON)
2323
set(HAVE_D3D10 ON)
2424
set(HAVE_D3D9 ON)
25+
26+
if(HAVE_OPENCL AND WITH_OPENCL_D3D11_NV AND EXISTS "${OPENCL_INCLUDE_DIR}/CL/cl_d3d11_ext.h")
27+
set(HAVE_OPENCL_D3D11_NV ON)
28+
endif()
29+
2530
endif()

cmake/OpenCVDetectOpenCL.cmake

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ mark_as_advanced(OPENCL_INCLUDE_DIR OPENCL_LIBRARY)
1111

1212
if(OPENCL_FOUND)
1313

14-
if(WITH_OPENCL_D3D11_NV AND EXISTS "${OPENCL_INCLUDE_DIR}/CL/cl_d3d11_ext.h")
15-
set(HAVE_OPENCL_D3D11_NV ON)
16-
endif()
17-
1814
if(OPENCL_LIBRARY)
1915
set(HAVE_OPENCL_STATIC ON)
2016
set(OPENCL_LIBRARIES "${OPENCL_LIBRARY}")
@@ -82,4 +78,7 @@ if(OPENCL_FOUND)
8278
list(APPEND OPENCL_INCLUDE_DIRS "${CLAMDBLAS_INCLUDE_DIR}")
8379
endif()
8480
endif()
81+
82+
# check WITH_OPENCL_D3D11_NV is located in OpenCVDetectDirectX.cmake file
83+
8584
endif()

0 commit comments

Comments
 (0)