From 04a58ea06c0f6321dd798f94db24f37ef5f70f50 Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Wed, 15 Jul 2015 14:56:24 +0200 Subject: [PATCH] Add OpenCL include directories to ICD - Also make it PUBLIC in cmake so that all who link to it will also get the OpenCL headers --- ethminer/CMakeLists.txt | 3 --- exp/CMakeLists.txt | 3 --- khronos_icd/CMakeLists.txt | 1 + khronos_icd/test/platform/CMakeLists.txt | 1 + libethash-cl/CMakeLists.txt | 1 - libethcore/CMakeLists.txt | 4 ---- 6 files changed, 2 insertions(+), 11 deletions(-) diff --git a/ethminer/CMakeLists.txt b/ethminer/CMakeLists.txt index 90889ae12..c321f0e5d 100644 --- a/ethminer/CMakeLists.txt +++ b/ethminer/CMakeLists.txt @@ -9,9 +9,6 @@ if (JSONRPC) include_directories(BEFORE ${JSONCPP_INCLUDE_DIRS}) include_directories(${JSON_RPC_CPP_INCLUDE_DIRS}) endif() -if (ETHASHCL) - include_directories(${OpenCL_INCLUDE_DIRS}) -endif () set(EXECUTABLE ethminer) diff --git a/exp/CMakeLists.txt b/exp/CMakeLists.txt index be7cec3d9..41940beef 100644 --- a/exp/CMakeLists.txt +++ b/exp/CMakeLists.txt @@ -6,9 +6,6 @@ aux_source_directory(. SRC_LIST) include_directories(BEFORE ${JSONCPP_INCLUDE_DIRS}) include_directories(BEFORE ..) include_directories(${DB_INCLUDE_DIRS}) -if (ETHASHCL) - include_directories(${OpenCL_INCLUDE_DIRS}) -endif () set(EXECUTABLE exp) diff --git a/khronos_icd/CMakeLists.txt b/khronos_icd/CMakeLists.txt index 9fc7ad2cd..b71a7c433 100644 --- a/khronos_icd/CMakeLists.txt +++ b/khronos_icd/CMakeLists.txt @@ -29,6 +29,7 @@ if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") endif () target_link_libraries (OpenCL_ICD ${CMAKE_DL_LIBS}) +target_include_directories(OpenCL_ICD PUBLIC ${OpenCL_INCLUDE_DIR}) enable_testing() add_subdirectory (test) diff --git a/khronos_icd/test/platform/CMakeLists.txt b/khronos_icd/test/platform/CMakeLists.txt index b35ca9336..c8af58a76 100644 --- a/khronos_icd/test/platform/CMakeLists.txt +++ b/khronos_icd/test/platform/CMakeLists.txt @@ -1 +1,2 @@ add_library (IcdLog SHARED icd_test_log.c) +target_include_directories(IcdLog PUBLIC ${OpenCL_INCLUDE_DIR}) \ No newline at end of file diff --git a/libethash-cl/CMakeLists.txt b/libethash-cl/CMakeLists.txt index 8fa7c97f3..70f711a76 100644 --- a/libethash-cl/CMakeLists.txt +++ b/libethash-cl/CMakeLists.txt @@ -21,7 +21,6 @@ set(HEADERS ${OUR_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/ethash_cl_miner_kernel.h) include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(${Boost_INCLUDE_DIRS}) -include_directories(${OpenCL_INCLUDE_DIRS}) include_directories(..) add_library(${EXECUTABLE} ${SRC_LIST} ${HEADERS}) TARGET_LINK_LIBRARIES(${EXECUTABLE} OpenCL_ICD ethash) diff --git a/libethcore/CMakeLists.txt b/libethcore/CMakeLists.txt index 4dd626642..73ea75c8c 100644 --- a/libethcore/CMakeLists.txt +++ b/libethcore/CMakeLists.txt @@ -12,10 +12,6 @@ aux_source_directory(. SRC_LIST) include_directories(BEFORE ..) include_directories(${Boost_INCLUDE_DIRS}) -if (ETHASHCL) - include_directories(${OpenCL_INCLUDE_DIRS}) -endif () - if (CPUID_FOUND) include_directories(${Cpuid_INCLUDE_DIRS}) endif ()