From 502cec737a1d24e8123556b90204d536e81937d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Thu, 16 Jul 2015 01:50:25 +0200 Subject: [PATCH] Another try for OSX. --- CMakeLists.txt | 3 --- libethash-cl/CMakeLists.txt | 6 +++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 55aff81e7..7edaf8401 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -427,9 +427,6 @@ if (GENERAL OR MINER) if (ETHASHCL) add_subdirectory(libethash-cl) if (APPLE) - add_library(OpenCL SHARED IMPORTED) - set_property(TARGET OpenCL PROPERTY IMPORTED_LOCATION ${OpenCL_LIBRARY}) - set(OpenCL_TARGET OpenCL) else() add_subdirectory(khronos_icd) set(OpenCL_TARGET OpenCL_ICD) diff --git a/libethash-cl/CMakeLists.txt b/libethash-cl/CMakeLists.txt index 8688648bd..b76eabfb5 100644 --- a/libethash-cl/CMakeLists.txt +++ b/libethash-cl/CMakeLists.txt @@ -23,7 +23,11 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(${Boost_INCLUDE_DIRS}) include_directories(..) add_library(${EXECUTABLE} ${SRC_LIST} ${HEADERS}) -TARGET_LINK_LIBRARIES(${EXECUTABLE} ${OpenCL_TARGET} ethash) +if (APPLE) + TARGET_LINK_LIBRARIES(${EXECUTABLE} ${OpenCL_LIBRARY} ethash) +else() + TARGET_LINK_LIBRARIES(${EXECUTABLE} OpenCL_ICD ethash) +endif() install( TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib ) install( FILES ${HEADERS} DESTINATION include/${EXECUTABLE} )