Move the CUDA searching code in OpenCVConfig.cmake.in out of the foreach loop

There's no reason to do it twice.
This commit is contained in:
Roman Donchenko 2015-03-30 15:04:27 +03:00
parent 122b9f8e17
commit e6619cf580

View File

@ -234,9 +234,10 @@ endif()
foreach(__opttype OPT DBG)
SET(OpenCV_LIBS_${__opttype} "${OpenCV_LIBS}")
SET(OpenCV_EXTRA_LIBS_${__opttype} "")
endforeach()
# CUDA
if(OpenCV_CUDA_VERSION)
# CUDA
if(OpenCV_CUDA_VERSION)
if(NOT CUDA_FOUND)
find_host_package(CUDA ${OpenCV_CUDA_VERSION} EXACT REQUIRED)
else()
@ -280,8 +281,8 @@ foreach(__opttype OPT DBG)
list(REMOVE_DUPLICATES OpenCV_CUDA_LIBS_RELPATH)
link_directories(${OpenCV_CUDA_LIBS_RELPATH})
endif()
endforeach()
endif()
# ==============================================================
# Android camera helper macro