Use imported targets for linking to CUDA
authorRoman Donchenko <roman.donchenko@itseez.com>
Mon, 30 Mar 2015 12:16:32 +0000 (15:16 +0300)
committerRoman Donchenko <roman.donchenko@itseez.com>
Tue, 31 Mar 2015 10:46:28 +0000 (13:46 +0300)
commit6e121b2e29dc66304d93ad4840e6bc8ff938115d
treeae5d038660ea0187a4ace44b3bc2432f501d6582
parente6619cf580c40243d0b66faab71f1ba4de73ce8d
Use imported targets for linking to CUDA

This retains the desirable quality of not including paths to CUDA libraries
from the build system into the config files, and has two major advantages:

* It removes the need to use link_directories, which doesn't guarantee that
  the libraries from the supplied directory will be used (there may be
  libraries with the same names earlier in the search path).

* It removes the need to put -L entries into OPENCV_LINKER_LIBS. This variable
  is used with target_link_libraries, where such entries are treated as linker
  flags, so doing this is unportable. I remove the support for -L entries
  from OpenCVGenPkgconfig.cmake, as well, to discourage adding them in the
  future.
CMakeLists.txt
cmake/OpenCVDetectCUDA.cmake
cmake/OpenCVGenPkgconfig.cmake
cmake/OpenCVModule.cmake
cmake/OpenCVUtils.cmake
cmake/templates/OpenCV.mk.in
cmake/templates/OpenCVConfig.cmake.in