Skip to content

Commit 3ecba31

Browse files
authored
Merge pull request #1241 from kbenzie/benie/cl-fix-windows-build
[CL] Fix Windows CMake, remove explicit Linux path
2 parents c53953a + da50cd7 commit 3ecba31

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

source/adapters/opencl/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,14 @@ if(UR_OPENCL_ICD_LOADER_LIBRARY)
6767
set(OpenCLICDLoaderLibrary ${UR_OPENCL_ICD_LOADER_LIBRARY})
6868
else()
6969
find_package(OpenCL 3.0)
70-
if(OpenCL_FOUND)
71-
set(OpenCLICDLoaderLibrary OpenCL::OpenCL)
72-
else()
70+
if(NOT OpenCL_FOUND)
7371
FetchContent_Declare(OpenCL-ICD-Loader
7472
GIT_REPOSITORY "https://github.com/KhronosGroup/OpenCL-ICD-Loader.git"
7573
GIT_TAG main
7674
)
7775
FetchContent_MakeAvailable(OpenCL-ICD-Loader)
78-
set(OpenCLICDLoaderLibrary ${PROJECT_BINARY_DIR}/lib/libOpenCL.so)
7976
endif()
77+
set(OpenCLICDLoaderLibrary OpenCL::OpenCL)
8078
endif()
8179

8280
message(STATUS "OpenCL Include Directory: ${OpenCLIncludeDirectory}")

0 commit comments

Comments
 (0)