title: Could NOT find OpenCL (missing: OpenCL_LIBRARY)
body: <p>I'm trying to use OpenCL with CLion (specifically <a href="https://github.com/boostorg/compute" rel="noreferrer">boost compute</a>), using CMake, on windows 10 with nvidia gpu. It feels like I have tried everything, but I have no idea how CMake works, and I cannot find a basic enough post on the web for me to understand. The official documentation isn't that helpful to a beginner either. I also need to eventually get this running on OS X and some flavour of Linux.</p>
  
  <p>This is the mess I'm in (CmakeLists.txt):</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.3)
  project(cpl)
  
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
  #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2")
  
  set(SOURCE_FILES
          src/planner/main.cpp)
  
  set(BOOST_ROOT C:/boost)
  set(BOOSTROOT C:/boost)
  
  include_directories(lib/compute/include)
  
  include_directories($ENV{CUDA_PATH})
  
  # boost
  set(Boost_USE_STATIC_LIBS OFF)
  set(Boost_USE_MULTITHREADED ON)
  set(Boost_USE_STATIC_RUNTIME OFF)
  find_package(Boost 1.60.0 REQUIRED)
  
  # opencl
  set(CMAKE_MODULE_PATH lib/cmake)
  
  find_package(OpenCL REQUIRED)
  
  INCLUDE_DIRECTORIES(${OpenCL_INCLUDE_DIRS})
  
  LINK_DIRECTORIES(${OpenCL_LIBRARY})
  
  message(STATUS "OpenCL found: ${OPENCL_FOUND}")
  message(STATUS "OpenCL includes: ${OPENCL_INCLUDE_DIRS}")
  message(STATUS "OpenCL CXX includes: ${OPENCL_HAS_CPP_BINDINGS}")
  message(STATUS "OpenCL libraries: ${OPENCL_LIBRARIES}")
  
  #target_link_libraries(cpl OpenCL)
  </code></pre>
  
  <p>And this is the error I'm getting:</p>
  
  <pre><code>C:\Users\drathier\.CLion2016.1\system\cygwin_cmake\bin\cmake.exe --build C:\Users\drathier\.CLion2016.1\system\cmake\generated\cpl-bfc654e8\bfc654e8\Debug --target all -- -j 8
  -- Boost version: 1.60.0
  CMake Error at /cygdrive/c/Users/drathier/.CLion2016.1/system/cygwin_cmake/share/cmake-3.5.1/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
    Could NOT find OpenCL (missing: OpenCL_LIBRARY)
  Call Stack (most recent call first):
    /cygdrive/c/Users/drathier/.CLion2016.1/system/cygwin_cmake/share/cmake-3.5.1/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
    /cygdrive/c/Users/drathier/.CLion2016.1/system/cygwin_cmake/share/cmake-3.5.1/Modules/FindOpenCL.cmake:128 (find_package_handle_standard_args)
    CMakeLists.txt:22 (find_package)
  </code></pre>
  
  <p>CMakeOutput.log: <a href="http://pastebin.com/EgGyRk9H" rel="noreferrer">http://pastebin.com/EgGyRk9H</a></p>