[build] OpenCL CMAKE requirements restored for macOS
cmake_minimum_required (VERSION 3.6)
project (Tornado)
+if(APPLE)
+ find_package(OpenCL REQUIRED)
+endif()
find_package(JNI REQUIRED)
set(CMAKE_BUILD_TYPE Release)
@@ -27,7 +30,11 @@ add_library(tornado-opencl SHARED
source/utils.cpp
source/opencl_time_utils.cpp)
+if(APPLE)
+ target_link_libraries(tornado-opencl ${OpenCL_LIBRARIES} ${JNI_LIB_DIRS})
+else()
target_link_libraries(tornado-opencl -lOpenCL ${OpenCL_LIBRARIES} ${JNI_LIB_DIRS})
+endif()
if(CMAKE_HOST_WIN32)
set_target_properties(tornado-opencl PROPERTIES PREFIX "")
endif()
