cmake_minimum_required(VERSION 2.8) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") project(opencl-test) find_package(OpenCL REQUIRED) 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}") add_executable(${PROJECT_NAME} "main.cpp") target_link_libraries(${PROJECT_NAME} ${OPENCL_LIBRARIES}) include_directories(${PROJECT_NAME} ${OPENCL_INCLUDE_DIR})