From: Niko Li Date: Tue, 17 Jul 2012 06:49:32 +0000 (+0000) Subject: fix a bug of detect opencl X-Git-Tag: accepted/2.0/20130307.220821~364^2~325 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5dc7752d54e78f298c2f1e7cdd80f797945396e2;p=profile%2Fivi%2Fopencv.git fix a bug of detect opencl --- diff --git a/cmake/OpenCVDetectOpenCL.cmake b/cmake/OpenCVDetectOpenCL.cmake index d000926..3b021bc 100644 --- a/cmake/OpenCVDetectOpenCL.cmake +++ b/cmake/OpenCVDetectOpenCL.cmake @@ -16,14 +16,14 @@ else() else() set(OPENCL_LIB_SEARCH_PATH ${OPENCL_LIB_SEARCH_PATH} ${ENV_AMDSTREAMSDKROOT}/lib/x86_64) endif() - elif(ENV_CUDAPATH AND WIN32) + elseif(ENV_CUDAPATH AND WIN32) set(OPENCL_INCLUDE_SEARCH_PATH ${ENV_CUDA_PATH}/include) if(CMAKE_SIZEOF_VOID_P EQUAL 4) set(OPENCL_LIB_SEARCH_PATH ${OPENCL_LIB_SEARCH_PATH} ${ENV_CUDA_PATH}/lib/Win32) else() set(OPENCL_LIB_SEARCH_PATH ${OPENCL_LIB_SEARCH_PATH} ${ENV_CUDA_PATH}/lib/x64) endif() - elif(ENV_OPENCLROOT AND UNIX) + elseif(ENV_OPENCLROOT AND UNIX) set(OPENCL_INCLUDE_SEARCH_PATH ${ENV_OPENCLROOT}/inc) if(CMAKE_SIZEOF_VOID_P EQUAL 4) set(OPENCL_LIB_SEARCH_PATH ${OPENCL_LIB_SEARCH_PATH} /usr/lib) @@ -57,8 +57,11 @@ else() if(OPENCL_FOUND) set(OPENCL_LIBRARIES ${OPENCL_LIBRARY}) + set(HAVE_OPENCL 1) else() set(OPENCL_LIBRARIES) endif() + else() + set(HAVE_OPENCL 1) endif() endif()