cmake_minimum_required(VERSION 2.8) set(LIBNAME JCLWrapper) file(GLOB sources "*.cpp") file(GLOB headers "*.hpp") add_library(${LIBNAME} ${headers} ${sources}) find_library(OPENCL_LIBRARY OpenCL) set(libs ${OPENCL_LIBRARY}) set(${LIBNAME}_LIBRARIES ${LIBNAME} ${libs} CACHE INTERNAL "") target_link_libraries(${LIBNAME} ${libs}) target_include_directories(${LIBNAME} PUBLIC ".") install(TARGETS ${LIBNAME} DESTINATION lib) install(FILES ${headers} DESTINATION include/J)