Browse Source
CMake: enforce OpenCL package from Hunter
cl-refactor
Paweł Bylica
8 years ago
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
1 changed files with
6 additions and
5 deletions
-
libethash-cl/CMakeLists.txt
|
@ -17,16 +17,17 @@ aux_source_directory(. SRC_LIST) |
|
|
file(GLOB OUR_HEADERS "*.h") |
|
|
file(GLOB OUR_HEADERS "*.h") |
|
|
set(HEADERS ${OUR_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/ethash_cl_miner_kernel.h) |
|
|
set(HEADERS ${OUR_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/ethash_cl_miner_kernel.h) |
|
|
|
|
|
|
|
|
if(NOT APPLE) |
|
|
if(APPLE) |
|
|
# TODO: Take cl.hpp also from hunter. |
|
|
# On macOS use system OpenCL library. |
|
|
|
|
|
find_package(OpenCL REQUIRED) |
|
|
|
|
|
else() |
|
|
hunter_add_package(OpenCL) |
|
|
hunter_add_package(OpenCL) |
|
|
|
|
|
find_package(OpenCL CONFIG REQUIRED) |
|
|
endif() |
|
|
endif() |
|
|
find_package(OpenCL REQUIRED) |
|
|
|
|
|
|
|
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}) |
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}) |
|
|
include_directories(..) |
|
|
include_directories(..) |
|
|
|
|
|
|
|
|
add_library(ethash-cl ${SRC_LIST} ${HEADERS}) |
|
|
add_library(ethash-cl ${SRC_LIST} ${HEADERS}) |
|
|
target_link_libraries(ethash-cl PUBLIC ethash) |
|
|
target_link_libraries(ethash-cl PUBLIC ethash) |
|
|
target_link_libraries(ethash-cl PRIVATE ${OpenCL_LIBRARY}) |
|
|
target_link_libraries(ethash-cl PRIVATE OpenCL::OpenCL) |
|
|
target_include_directories(ethash-cl PRIVATE SYSTEM ${OpenCL_INCLUDE_DIR}) |
|
|
|
|
|