From afdf319f368815e86c64c7641de7d88325cb2d5d Mon Sep 17 00:00:00 2001 From: quentin Date: Thu, 5 Mar 2015 14:37:21 +0100 Subject: [PATCH] Add -L for CUDA libs path to pkg-config Add all dirs from CUDA_LIBS_PATH as -L linker options to OPENCV_LINKER_LIBS. These will end up in opencv.pc. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 665ffe3d62..4a34fc65b0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -540,6 +540,9 @@ if(HAVE_CUDA AND NOT ENABLE_DYNAMIC_CUDA) if(HAVE_CUFFT) set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CUDA_cufft_LIBRARY}) endif() + foreach(p ${CUDA_LIBS_PATH}) + set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} -L${p}) + endforeach() endif() # ----------------------------------------------------------------------------