From ad5c2de97c05c18e74c5236d00af30335d3cebb9 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Mon, 14 Jul 2014 21:27:23 +0400 Subject: [PATCH] Deb package build fix for CUDA 6.5 and newer. (cherry picked from commit e650d87e470b2e6a8f87ad4dd81977748a136aee) (cherry picked from commit ca9c52ac9778d01eba933a786b4303c79d0162be) --- cmake/OpenCVPackaging.cmake | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/cmake/OpenCVPackaging.cmake b/cmake/OpenCVPackaging.cmake index 91f5940..65e6c13 100644 --- a/cmake/OpenCVPackaging.cmake +++ b/cmake/OpenCVPackaging.cmake @@ -68,9 +68,23 @@ set(CPACK_COMPONENT_tests_DEPENDS libs) if(HAVE_CUDA) string(REPLACE "." "-" cuda_version_suffix ${CUDA_VERSION}) - set(CPACK_DEB_libs_PACKAGE_DEPENDS "cuda-core-libs-${cuda_version_suffix}, cuda-extra-libs-${cuda_version_suffix}") + if(${CUDA_VERSION} VERSION_LESS "6.5") + 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}") + 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}") + 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}") + endif() + endif() set(CPACK_COMPONENT_dev_DEPENDS libs) - set(CPACK_DEB_dev_PACKAGE_DEPENDS "cuda-headers-${cuda_version_suffix}") + endif() if(NOT OPENCV_CUSTOM_PACKAGE_INFO) -- 2.7.4