From a8b2b4dba12e8d23bec2a8cac98c5838620c6c6b Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Fri, 27 May 2016 13:46:12 +0300 Subject: [PATCH] Packaging fixes for Ubuntu 16.04. --- cmake/OpenCVPackaging.cmake | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/cmake/OpenCVPackaging.cmake b/cmake/OpenCVPackaging.cmake index 106c03ff1..9fef5e747 100644 --- a/cmake/OpenCVPackaging.cmake +++ b/cmake/OpenCVPackaging.cmake @@ -98,15 +98,15 @@ if(HAVE_CUDA) set(CPACK_DEB_LIBS_PACKAGE_DEPENDS "cuda-core-libs-${cuda_version_suffix}, cuda-extra-libs-${cuda_version_suffix}") set(CPACK_DEB_DEV_PACKAGE_DEPENDS "cuda-headers-${cuda_version_suffix}") else() - set(CPACK_DEB_LIBS_PACKAGE_DEPENDS "cuda-cudart-${cuda_version_suffix}, cuda-npp-${cuda_version_suffix}") - set(CPACK_DEB_DEV_PACKAGE_DEPENDS "cuda-cudart-dev-${cuda_version_suffix}, cuda-npp-dev-${cuda_version_suffix}") + set(CPACK_DEB_LIBS_PACKAGE_DEPENDS "cuda-cudart-${cuda_version_suffix} | libcudart${CUDA_VERSION}, cuda-npp-${cuda_version_suffix} | libnppc${CUDA_VERSION}, cuda-npp-${cuda_version_suffix} | libnppi${CUDA_VERSION}, cuda-npp-${cuda_version_suffix} | libnpps${CUDA_VERSION}") + set(CPACK_DEB_DEV_PACKAGE_DEPENDS "cuda-cudart-dev-${cuda_version_suffix} | nvidia-cuda-dev (>=${CUDA_VERSION}), cuda-npp-dev-${cuda_version_suffix} | nvidia-cuda-dev (>=${CUDA_VERSION})") if(HAVE_CUFFT) - set(CPACK_DEB_LIBS_PACKAGE_DEPENDS "${CPACK_DEB_LIBS_PACKAGE_DEPENDS}, cuda-cufft-${cuda_version_suffix}") - set(CPACK_DEB_DEV_PACKAGE_DEPENDS "${CPACK_DEB_DEV_PACKAGE_DEPENDS}, cuda-cufft-dev-${cuda_version_suffix}") + set(CPACK_DEB_LIBS_PACKAGE_DEPENDS "${CPACK_DEB_LIBS_PACKAGE_DEPENDS}, cuda-cufft-${cuda_version_suffix} | libcufft${CUDA_VERSION}") + set(CPACK_DEB_DEV_PACKAGE_DEPENDS "${CPACK_DEB_DEV_PACKAGE_DEPENDS}, cuda-cufft-dev-${cuda_version_suffix} | nvidia-cuda-dev (>=${CUDA_VERSION})") endif() if(HAVE_HAVE_CUBLAS) - set(CPACK_DEB_LIBS_PACKAGE_DEPENDS "${CPACK_DEB_LIBS_PACKAGE_DEPENDS}, cuda-cublas-${cuda_version_suffix}") - set(CPACK_DEB_DEV_PACKAGE_DEPENDS "${CPACK_DEB_DEV_PACKAGE_DEPENDS}, cuda-cublas-dev-${cuda_version_suffix}") + set(CPACK_DEB_LIBS_PACKAGE_DEPENDS "${CPACK_DEB_LIBS_PACKAGE_DEPENDS}, cuda-cublas-${cuda_version_suffix} | libcublas${CUDA_VERSION}") + set(CPACK_DEB_DEV_PACKAGE_DEPENDS "${CPACK_DEB_DEV_PACKAGE_DEPENDS}, cuda-cublas-dev-${cuda_version_suffix} | nvidia-cuda-dev (>=${CUDA_VERSION})") endif() endif() endif() @@ -122,10 +122,17 @@ endif() set(STD_OPENCV_LIBS opencv-data) set(STD_OPENCV_DEV libopencv-dev) +set(ABI_VERSION_SUFFIX "") +if(CMAKE_COMPILER_IS_GNUCXX) + if(${CMAKE_OPENCV_GCC_VERSION_MAJOR} EQUAL 5) + set(ABI_VERSION_SUFFIX "v5") + endif() +endif() + foreach(module calib3d contrib core features2d flann gpu highgui imgproc legacy ml objdetect ocl photo stitching superres ts video videostab) if(HAVE_opencv_${module}) - list(APPEND STD_OPENCV_LIBS "libopencv-${module}2.4") + list(APPEND STD_OPENCV_LIBS "libopencv-${module}2.4${ABI_VERSION_SUFFIX}") list(APPEND STD_OPENCV_DEV "libopencv-${module}-dev") endif() endforeach()