Update the CPack variables to match the changes in asmorkalov/CMake#1

Which also happens to align the non-Debian specific variables
with the ones used by upstream CMake.
This commit is contained in:
Roman Donchenko 2015-02-20 18:15:20 +03:00
parent a46166d30f
commit b8c60234c3

View File

@ -64,66 +64,64 @@ set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://opencv.org")
#depencencies
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE)
set(CPACK_COMPONENT_samples_DEPENDS libs dev)
set(CPACK_COMPONENT_dev_DEPENDS libs)
set(CPACK_COMPONENT_docs_DEPENDS libs)
set(CPACK_COMPONENT_java_DEPENDS libs)
set(CPACK_COMPONENT_python_DEPENDS libs)
set(CPACK_DEB_python_PACKAGE_DEPENDS "python-numpy (>=${PYTHON_NUMPY_VERSION}), python${PYTHON_VERSION_MAJOR_MINOR}")
set(CPACK_COMPONENT_tests_DEPENDS libs)
set(CPACK_COMPONENT_SAMPLES_DEPENDS libs dev)
set(CPACK_COMPONENT_DEV_DEPENDS libs)
set(CPACK_COMPONENT_DOCS_DEPENDS libs)
set(CPACK_COMPONENT_JAVA_DEPENDS libs)
set(CPACK_COMPONENT_PYTHON_DEPENDS libs)
set(CPACK_DEB_PYTHON_PACKAGE_DEPENDS "python-numpy (>=${PYTHON_NUMPY_VERSION}), python${PYTHON_VERSION_MAJOR_MINOR}")
set(CPACK_COMPONENT_TESTS_DEPENDS libs)
if (HAVE_opencv_python)
set(CPACK_DEB_tests_PACKAGE_DEPENDS "python-numpy (>=${PYTHON_NUMPY_VERSION}), python${PYTHON_VERSION_MAJOR_MINOR}, python-py | python-pytest")
set(CPACK_DEB_TESTS_PACKAGE_DEPENDS "python-numpy (>=${PYTHON_NUMPY_VERSION}), python${PYTHON_VERSION_MAJOR_MINOR}, python-py | python-pytest")
endif()
if(HAVE_CUDA)
string(REPLACE "." "-" cuda_version_suffix ${CUDA_VERSION})
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}")
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}, 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}")
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}")
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)
endif()
if(NOT OPENCV_CUSTOM_PACKAGE_INFO)
set(CPACK_COMPONENT_libs_DISPLAY_NAME "libopencv")
set(CPACK_COMPONENT_libs_DESCRIPTION "Open Computer Vision Library")
set(CPACK_COMPONENT_libs_SECTION "libs")
set(CPACK_COMPONENT_LIBS_DESCRIPTION "Open Computer Vision Library")
set(CPACK_DEBIAN_COMPONENT_LIBS_NAME "libopencv")
set(CPACK_DEBIAN_COMPONENT_LIBS_SECTION "libs")
set(CPACK_COMPONENT_python_DISPLAY_NAME "libopencv-python")
set(CPACK_COMPONENT_python_DESCRIPTION "Python bindings for Open Source Computer Vision Library")
set(CPACK_COMPONENT_python_SECTION "python")
set(CPACK_COMPONENT_PYTHON_DESCRIPTION "Python bindings for Open Source Computer Vision Library")
set(CPACK_DEBIAN_COMPONENT_PYTHON_NAME "libopencv-python")
set(CPACK_DEBIAN_COMPONENT_PYTHON_SECTION "python")
set(CPACK_COMPONENT_java_DISPLAY_NAME "libopencv-java")
set(CPACK_COMPONENT_java_DESCRIPTION "Java bindings for Open Source Computer Vision Library")
set(CPACK_COMPONENT_java_SECTION "java")
set(CPACK_COMPONENT_JAVA_DESCRIPTION "Java bindings for Open Source Computer Vision Library")
set(CPACK_DEBIAN_COMPONENT_JAVA_NAME "libopencv-java")
set(CPACK_DEBIAN_COMPONENT_JAVA_SECTION "java")
set(CPACK_COMPONENT_dev_DISPLAY_NAME "libopencv-dev")
set(CPACK_COMPONENT_dev_DESCRIPTION "Development files for Open Source Computer Vision Library")
set(CPACK_COMPONENT_dev_SECTION "libdevel")
set(CPACK_COMPONENT_DEV_DESCRIPTION "Development files for Open Source Computer Vision Library")
set(CPACK_DEBIAN_COMPONENT_DEV_NAME "libopencv-dev")
set(CPACK_DEBIAN_COMPONENT_DEV_SECTION "libdevel")
set(CPACK_COMPONENT_docs_DISPLAY_NAME "libopencv-docs")
set(CPACK_COMPONENT_docs_DESCRIPTION "Documentation for Open Source Computer Vision Library")
set(CPACK_COMPONENT_docs_SECTION "doc")
set(CPACK_COMPONENT_DOCS_DESCRIPTION "Documentation for Open Source Computer Vision Library")
set(CPACK_DEBIAN_COMPONENT_DOCS_NAME "libopencv-docs")
set(CPACK_DEBIAN_COMPONENT_DOCS_SECTION "doc")
set(CPACK_COMPONENT_samples_DISPLAY_NAME "libopencv-samples")
set(CPACK_COMPONENT_samples_DESCRIPTION "Samples for Open Source Computer Vision Library")
set(CPACK_COMPONENT_samples_SECTION "devel")
set(CPACK_COMPONENT_SAMPLES_DESCRIPTION "Samples for Open Source Computer Vision Library")
set(CPACK_DEBIAN_COMPONENT_SAMPLES_NAME "libopencv-samples")
set(CPACK_DEBIAN_COMPONENT_SAMPLES_SECTION "devel")
set(CPACK_COMPONENT_tests_DISPLAY_NAME "libopencv-tests")
set(CPACK_COMPONENT_tests_DESCRIPTION "Accuracy and performance tests for Open Source Computer Vision Library")
set(CPACK_COMPONENT_tests_SECTION "misc")
set(CPACK_COMPONENT_TESTS_DESCRIPTION "Accuracy and performance tests for Open Source Computer Vision Library")
set(CPACK_DEBIAN_COMPONENT_TESTS_NAME "libopencv-tests")
set(CPACK_DEBIAN_COMPONENT_TESTS_SECTION "misc")
endif(NOT OPENCV_CUSTOM_PACKAGE_INFO)
if(CPACK_GENERATOR STREQUAL "DEB")
@ -139,9 +137,10 @@ if(CPACK_GENERATOR STREQUAL "DEB")
set(CHANGELOG_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}")
set(ALL_COMPONENTS "libs" "dev" "docs" "python" "java" "samples" "tests")
foreach (comp ${ALL_COMPONENTS})
string(TOUPPER "${comp}" comp_upcase)
set(DEBIAN_CHANGELOG_OUT_FILE "${CMAKE_BINARY_DIR}/deb-packages-gen/${comp}/changelog.Debian")
set(DEBIAN_CHANGELOG_OUT_FILE_GZ "${CMAKE_BINARY_DIR}/deb-packages-gen/${comp}/changelog.Debian.gz")
set(CHANGELOG_PACKAGE_NAME "${CPACK_COMPONENT_${comp}_DISPLAY_NAME}")
set(CHANGELOG_PACKAGE_NAME "${CPACK_DEBIAN_COMPONENT_${comp_upcase}_NAME}")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/changelog.Debian.in" "${DEBIAN_CHANGELOG_OUT_FILE}" @ONLY)
execute_process(COMMAND "${GZIP_TOOL}" "-cf9" "${DEBIAN_CHANGELOG_OUT_FILE}"
@ -149,7 +148,7 @@ if(CPACK_GENERATOR STREQUAL "DEB")
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
install(FILES "${DEBIAN_CHANGELOG_OUT_FILE_GZ}"
DESTINATION "share/doc/${CPACK_COMPONENT_${comp}_DISPLAY_NAME}"
DESTINATION "share/doc/${CPACK_DEBIAN_COMPONENT_${comp_upcase}_NAME}"
COMPONENT "${comp}")
endforeach()
endif()