git-svn-id: svn://db.shs.com.ru/pip@588 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-12-24 19:41:18 +00:00
parent 2353b3b33f
commit 485a9d554d
4 changed files with 23 additions and 11 deletions

View File

@@ -371,13 +371,17 @@ endif()
# Check if PIP support OpenCL
find_package(OpenCL QUIET)
if(OpenCL_FOUND)
message(STATUS "Building with OpenCL support")
include_directories(${OpenCL_INCLUDE_DIRS})
message(STATUS "Building with OpenCL support)")
if(APPLE)
include_directories(${OpenCL_INCLUDE_DIRS}/Headers)
else()
include_directories(${OpenCL_INCLUDE_DIRS})
endif()
add_definitions(-DPIP_OPENCL)
pip_resources(CL_RES "src_opencl/resources.conf")
add_library(pip_opencl SHARED ${CPP_LIB_OPENCL} ${CL_RES})
add_dependencies(pip_opencl pip_rc)
target_link_libraries(pip_opencl pip ${OpenCL_LIBRARIES})
target_link_libraries(pip_opencl pip OpenCL::OpenCL)
list(APPEND LIBS_STATUS OpenCL)
list(APPEND PIP_LIBS_TARGETS pip_opencl)
set(OpenCL_FOUND ${OpenCL_LIBRARIES})