Commit ded71715 authored by Jeremy Tellaa's avatar Jeremy Tellaa Committed by jeremad

fix(opencl): fix windows GLEW linking

parent 17677418
...@@ -66,7 +66,8 @@ set(CL_BACKEND_SOURCES ...@@ -66,7 +66,8 @@ set(CL_BACKEND_SOURCES
if(NOT ANDROID) if(NOT ANDROID)
find_package(OpenCL REQUIRED) find_package(OpenCL REQUIRED)
if(WINDOWS) if(WINDOWS)
find_library(GLEW NAMES glew32s PATHS ${CMAKE_EXTERNAL_DEPS}/lib/GL NO_DEFAULT_PATH) find_library(GLEW "glew32" PATH "${VCPKG_PATH}\\${VCPKG_TARGET_TRIPLET}-static\\lib" NO_DEFAULT_PATH)
include_directories("${VCPKG_PATH}\\${VCPKG_TARGET_TRIPLET}-static\\include")
else() else()
find_package(GLEW REQUIRED) find_package(GLEW REQUIRED)
endif() endif()
...@@ -114,6 +115,11 @@ endif(DISABLE_OPENCL_SPIR) ...@@ -114,6 +115,11 @@ endif(DISABLE_OPENCL_SPIR)
# different names on different implementations of find_package(OpenCL) # different names on different implementations of find_package(OpenCL)
vs_lib_link_libraries("PUBLIC_OPENCL" ${OpenCL_LIBRARIES}) vs_lib_link_libraries("PUBLIC_OPENCL" ${OpenCL_LIBRARIES})
vs_lib_link_libraries("OPENCL" ${OpenGL_LIBRARIES} ${OPENGL_LIBRARIES} GLEW::GLEW) vs_lib_link_libraries("OPENCL" ${OpenGL_LIBRARIES} ${OPENGL_LIBRARIES})
if(WINDOWS)
vs_lib_link_libraries("OPENCL" ${GLEW})
else()
vs_lib_link_libraries("OPENCL" GLEW::GLEW)
endif()
set(BACKEND_OBJECTS_OPENCL ) set(BACKEND_OBJECTS_OPENCL )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment