diff --git a/cmake/OpenCVPackaging.cmake b/cmake/OpenCVPackaging.cmake index b771698027..ba583db649 100644 --- a/cmake/OpenCVPackaging.cmake +++ b/cmake/OpenCVPackaging.cmake @@ -97,31 +97,31 @@ if(HAVE_CUDA) endif() if(NOT OPENCV_CUSTOM_PACKAGE_INFO) - set(CPACK_COMPONENT_libs_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}") + 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_python_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-python") + 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_java_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-java") + 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_dev_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-dev") + 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_docs_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-docs") + 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_samples_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-samples") + 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_tests_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-tests") + 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") endif(NOT OPENCV_CUSTOM_PACKAGE_INFO) @@ -148,20 +148,18 @@ if(CPACK_GENERATOR STREQUAL "DEB") set(CHANGELOG_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}") set(ALL_COMPONENTS "libs" "dev" "docs" "python" "java" "samples") foreach (comp ${ALL_COMPONENTS}) - if(CPACK_${comp}_COMPONENT_INSTALL) - 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}") - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/changelog.Debian.in" "${DEBIAN_CHANGELOG_OUT_FILE}" @ONLY) + 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}") + 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}" - OUTPUT_FILE "${DEBIAN_CHANGELOG_OUT_FILE_GZ}" - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}") + execute_process(COMMAND "${GZIP_TOOL}" "-cf9" "${DEBIAN_CHANGELOG_OUT_FILE}" + OUTPUT_FILE "${DEBIAN_CHANGELOG_OUT_FILE_GZ}" + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}") - install(FILES "${DEBIAN_CHANGELOG_OUT_FILE_GZ}" - DESTINATION "share/doc/${CPACK_COMPONENT_${comp}_DISPLAY_NAME}" - COMPONENT "${comp}") - endif() + install(FILES "${DEBIAN_CHANGELOG_OUT_FILE_GZ}" + DESTINATION "share/doc/${CPACK_COMPONENT_${comp}_DISPLAY_NAME}" + COMPONENT "${comp}") endforeach() endif()