From cb438988b4916c883540407936357e3d6e4a7d18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Fri, 10 Jul 2015 15:13:50 +0200 Subject: [PATCH 1/2] Fix some cmake problems. --- ethminer/CMakeLists.txt | 2 +- exp/CMakeLists.txt | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/ethminer/CMakeLists.txt b/ethminer/CMakeLists.txt index df828bc47..8b12530a5 100644 --- a/ethminer/CMakeLists.txt +++ b/ethminer/CMakeLists.txt @@ -9,6 +9,7 @@ if (JSONRPC) include_directories(BEFORE ${JSONCPP_INCLUDE_DIRS}) include_directories(${JSON_RPC_CPP_INCLUDE_DIRS}) endif() +include_directories(${OpenCL_INCLUDE_DIRS}) set(EXECUTABLE ethminer) @@ -40,4 +41,3 @@ if (APPLE) else() eth_install_executable(${EXECUTABLE}) endif() - diff --git a/exp/CMakeLists.txt b/exp/CMakeLists.txt index 823425598..203022655 100644 --- a/exp/CMakeLists.txt +++ b/exp/CMakeLists.txt @@ -6,6 +6,7 @@ aux_source_directory(. SRC_LIST) include_directories(BEFORE ${JSONCPP_INCLUDE_DIRS}) include_directories(BEFORE ..) include_directories(${DB_INCLUDE_DIRS}) +include_directories(${OpenCL_INCLUDE_DIRS}) set(EXECUTABLE exp) @@ -27,11 +28,6 @@ target_link_libraries(${EXECUTABLE} p2p) if (ETHASHCL) target_link_libraries(${EXECUTABLE} ethash-cl) target_link_libraries(${EXECUTABLE} ethash) - target_link_libraries(${EXECUTABLE} OpenCL) + target_link_libraries(${EXECUTABLE} ${OpenCL_LIBRARIES}) endif() -install( TARGETS ${EXECUTABLE} DESTINATION bin) - - - - - +install( TARGETS ${EXECUTABLE} DESTINATION bin) From 4211a845b7277a7c9f0ec561badd26aece56f5ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Mon, 13 Jul 2015 11:08:51 +0200 Subject: [PATCH 2/2] Include OpenCL headers only in ETHASHCL builds. --- ethminer/CMakeLists.txt | 4 +++- exp/CMakeLists.txt | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ethminer/CMakeLists.txt b/ethminer/CMakeLists.txt index 8b12530a5..90889ae12 100644 --- a/ethminer/CMakeLists.txt +++ b/ethminer/CMakeLists.txt @@ -9,7 +9,9 @@ if (JSONRPC) include_directories(BEFORE ${JSONCPP_INCLUDE_DIRS}) include_directories(${JSON_RPC_CPP_INCLUDE_DIRS}) endif() -include_directories(${OpenCL_INCLUDE_DIRS}) +if (ETHASHCL) + include_directories(${OpenCL_INCLUDE_DIRS}) +endif () set(EXECUTABLE ethminer) diff --git a/exp/CMakeLists.txt b/exp/CMakeLists.txt index 203022655..e6360317f 100644 --- a/exp/CMakeLists.txt +++ b/exp/CMakeLists.txt @@ -6,7 +6,9 @@ aux_source_directory(. SRC_LIST) include_directories(BEFORE ${JSONCPP_INCLUDE_DIRS}) include_directories(BEFORE ..) include_directories(${DB_INCLUDE_DIRS}) -include_directories(${OpenCL_INCLUDE_DIRS}) +if (ETHASHCL) + include_directories(${OpenCL_INCLUDE_DIRS}) +endif () set(EXECUTABLE exp)