From 6b8ebf3e94dccd2c54056b6b8eee64ea6d99dbcd Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Tue, 9 Dec 2014 19:13:19 +0300 Subject: [PATCH 01/10] Fix memory leaks appearing when cvOpenFileStorage throws (cherry picked from commit 16ce114e0cad6c85efead4a0ebb07724d691407a) --- modules/core/src/persistence.cpp | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/modules/core/src/persistence.cpp b/modules/core/src/persistence.cpp index 5e14e81aa8..5c8fd2f97f 100644 --- a/modules/core/src/persistence.cpp +++ b/modules/core/src/persistence.cpp @@ -2692,7 +2692,10 @@ cvOpenFileStorage( const char* filename, CvMemStorage* dststorage, int flags, co (dot_pos[3] == '\0' || (cv_isdigit(dot_pos[3]) && dot_pos[4] == '\0')) ) { if( append ) + { + cvReleaseFileStorage( &fs ); CV_Error(CV_StsNotImplemented, "Appending data to compressed file is not implemented" ); + } isGZ = true; compression = dot_pos[3]; if( compression ) @@ -2713,6 +2716,7 @@ cvOpenFileStorage( const char* filename, CvMemStorage* dststorage, int flags, co if( !fs->gzfile ) goto _exit_; #else + cvReleaseFileStorage( &fs ); CV_Error(CV_StsNotImplemented, "There is no compressed file storage support in this configuration"); #endif } @@ -2765,7 +2769,10 @@ cvOpenFileStorage( const char* filename, CvMemStorage* dststorage, int flags, co if( strcmp( encoding, "UTF-16" ) == 0 || strcmp( encoding, "utf-16" ) == 0 || strcmp( encoding, "Utf-16" ) == 0 ) + { + cvReleaseFileStorage( &fs ); CV_Error( CV_StsBadArg, "UTF-16 XML encoding is not supported! Use 8-bit encoding\n"); + } CV_Assert( strlen(encoding) < 1000 ); char buf[1100]; @@ -2802,7 +2809,10 @@ cvOpenFileStorage( const char* filename, CvMemStorage* dststorage, int flags, co } } if( last_occurence < 0 ) + { + cvReleaseFileStorage( &fs ); CV_Error( CV_StsError, "Could not find in the end of file.\n" ); + } icvCloseFile( fs ); fs->file = fopen( fs->filename, "r+t" ); fseek( fs->file, last_occurence, SEEK_SET ); @@ -2876,10 +2886,18 @@ cvOpenFileStorage( const char* filename, CvMemStorage* dststorage, int flags, co //mode = cvGetErrMode(); //cvSetErrMode( CV_ErrModeSilent ); - if( fs->fmt == CV_STORAGE_FORMAT_XML ) - icvXMLParse( fs ); - else - icvYMLParse( fs ); + try + { + if( fs->fmt == CV_STORAGE_FORMAT_XML ) + icvXMLParse( fs ); + else + icvYMLParse( fs ); + } + catch (...) + { + cvReleaseFileStorage( &fs ); + throw; + } //cvSetErrMode( mode ); // release resources that we do not need anymore From 6274e1fc5fde32cf27aca5278b98676cd8c8a5f9 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Mon, 22 Dec 2014 18:54:39 +0300 Subject: [PATCH 02/10] cvOpenFileStorage: reduce the scope of xml_buf and make sure it's freed... ... before any exceptions occur. (cherry picked from commit 08da247a871ed40b868119a999af538da6526c6d) --- modules/core/src/persistence.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/core/src/persistence.cpp b/modules/core/src/persistence.cpp index 5c8fd2f97f..002ff01d09 100644 --- a/modules/core/src/persistence.cpp +++ b/modules/core/src/persistence.cpp @@ -2651,7 +2651,6 @@ CV_IMPL CvFileStorage* cvOpenFileStorage( const char* filename, CvMemStorage* dststorage, int flags, const char* encoding ) { CvFileStorage* fs = 0; - char* xml_buf = 0; int default_block_size = 1 << 18; bool append = (flags & 3) == CV_STORAGE_APPEND; bool mem = (flags & CV_STORAGE_MEMORY) != 0; @@ -2790,7 +2789,7 @@ cvOpenFileStorage( const char* filename, CvMemStorage* dststorage, int flags, co int last_occurence = -1; xml_buf_size = MIN(xml_buf_size, int(file_size)); fseek( fs->file, -xml_buf_size, SEEK_END ); - xml_buf = (char*)cvAlloc( xml_buf_size+2 ); + char* xml_buf = (char*)cvAlloc( xml_buf_size+2 ); // find the last occurence of for(;;) { @@ -2808,6 +2807,7 @@ cvOpenFileStorage( const char* filename, CvMemStorage* dststorage, int flags, co ptr += strlen(substr); } } + cvFree( &xml_buf ); if( last_occurence < 0 ) { cvReleaseFileStorage( &fs ); @@ -2922,7 +2922,6 @@ _exit_: } } - cvFree( &xml_buf ); return fs; } From 1858b5cfba95b7dee7850d2c1c15c4a62aa58fcc Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Thu, 12 Feb 2015 16:51:26 +0300 Subject: [PATCH 03/10] Don't install documentation if it isn't built The HAVE_DOC_GENERATOR variable was always true. (cherry picked from commit 3d46c1f9602bea7e6c6a49db8b6f2421166ef65d) Conflicts: doc/CMakeLists.txt --- doc/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index a9d6e22a47..866134fe1b 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -2,7 +2,11 @@ # CMake file for OpenCV docs #----------------------- -set(HAVE_DOC_GENERATOR BUILD_DOCS AND DOXYGEN_FOUND) +if(BUILD_DOCS AND DOXYGEN_FOUND) + set(HAVE_DOC_GENERATOR TRUE) +else() + set(HAVE_DOC_GENERATOR FALSE) +endif() if(HAVE_DOC_GENERATOR) project(opencv_docs) From 34ad2e0fa44340f5a7d2aec993ab541770a4be7d Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Fri, 13 Feb 2015 15:12:52 +0300 Subject: [PATCH 04/10] Fix a memory leak in CvCapture_FFMPEG::close FFmpeg now requires that frames allocated with avcodec_alloc_frame are freed with avcodec_free_frame. (cherry picked from commit 77578d415f4d2b22a4ee1989ef0afda73c9d649b) Conflicts: modules/highgui/src/cap_ffmpeg_impl.hpp --- modules/videoio/src/cap_ffmpeg_impl.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp index 5870f4bc71..5e371d21ee 100644 --- a/modules/videoio/src/cap_ffmpeg_impl.hpp +++ b/modules/videoio/src/cap_ffmpeg_impl.hpp @@ -302,7 +302,15 @@ void CvCapture_FFMPEG::close() } if( picture ) + { + // FFmpeg and Libav added avcodec_free_frame in different versions. +#if LIBAVCODEC_BUILD >= (LIBAVCODEC_VERSION_MICRO >= 100 \ + ? CALC_FFMPEG_VERSION(54, 59, 100) : CALC_FFMPEG_VERSION(54, 28, 0)) + avcodec_free_frame(&picture); +#else av_free(picture); +#endif + } if( video_st ) { From 1a3273a7e3f03feeadd242880f4aae9e40a03099 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Fri, 13 Feb 2015 15:31:19 +0300 Subject: [PATCH 05/10] Remove useless CPACK_*_COMPONENT_INSTALL variables They don't actually do anything. And even if they did, all components are enabled by default, anyway. (cherry picked from commit 49fe496914cca93f19dd61aa7b1c120037d65282) Conflicts: cmake/OpenCVPackaging.cmake --- cmake/OpenCVPackaging.cmake | 9 --------- 1 file changed, 9 deletions(-) diff --git a/cmake/OpenCVPackaging.cmake b/cmake/OpenCVPackaging.cmake index 91f5940960..eb26df69bd 100644 --- a/cmake/OpenCVPackaging.cmake +++ b/cmake/OpenCVPackaging.cmake @@ -96,15 +96,6 @@ if(NOT OPENCV_CUSTOM_PACKAGE_INFO) set(CPACK_COMPONENT_tests_DESCRIPTION "Accuracy and performance tests for Open Source Computer Vision Library") endif(NOT OPENCV_CUSTOM_PACKAGE_INFO) -if(NOT OPENCV_CUSTOM_PACKAGE_LAYOUT) - set(CPACK_libs_COMPONENT_INSTALL TRUE) - set(CPACK_dev_COMPONENT_INSTALL TRUE) - set(CPACK_docs_COMPONENT_INSTALL TRUE) - set(CPACK_python_COMPONENT_INSTALL TRUE) - set(CPACK_java_COMPONENT_INSTALL TRUE) - set(CPACK_samples_COMPONENT_INSTALL TRUE) -endif(NOT OPENCV_CUSTOM_PACKAGE_LAYOUT) - include(CPack) ENDif(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") \ No newline at end of file From 592122bf4fcadb2f653c95b8d6e0d69fc0d44ba0 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Mon, 16 Feb 2015 19:24:07 +0300 Subject: [PATCH 06/10] Install data on Windows Because why not? (cherry picked from commit e8a73940099b9823879e156a896e42a1854ca1bb) Conflicts: data/CMakeLists.txt --- data/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 2693112517..bc5a0361a7 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -4,7 +4,7 @@ file(GLOB LBP_CASCADES lbpcascades/*.xml) if(ANDROID) install(FILES ${HAAR_CASCADES} DESTINATION sdk/etc/haarcascades COMPONENT libs) install(FILES ${LBP_CASCADES} DESTINATION sdk/etc/lbpcascades COMPONENT libs) -elseif(NOT WIN32) +else() install(FILES ${HAAR_CASCADES} DESTINATION share/OpenCV/haarcascades COMPONENT libs) install(FILES ${LBP_CASCADES} DESTINATION share/OpenCV/lbpcascades COMPONENT libs) endif() From 35760bb6bfa1ca11e81244247d7d4d2e9050d991 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Fri, 20 Feb 2015 12:38:25 +0300 Subject: [PATCH 07/10] Add a script to run all tests on Windows It's pretty much a simplified copy of the Linux script, lacking fancy colors. Also, I had to drop Python testing, because it's not easy to pass the Python module location to the script, and I have no pressing need to run the Python tests at the moment. (cherry picked from commit c1e3ca170e6acd983fc010bffd6bc10f12a738c5) Conflicts: CMakeLists.txt --- CMakeLists.txt | 10 ++- .../opencv_run_all_tests_windows.cmd.in | 74 +++++++++++++++++++ 2 files changed, 81 insertions(+), 3 deletions(-) create mode 100644 cmake/templates/opencv_run_all_tests_windows.cmd.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 89b6cf7199..bc81d51cd0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -624,19 +624,23 @@ include(cmake/OpenCVGenConfig.cmake) include(cmake/OpenCVGenInfoPlist.cmake) # Generate environment setup file -if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH AND UNIX) +if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH) if(ANDROID) get_filename_component(TEST_PATH ${OPENCV_TEST_INSTALL_PATH} DIRECTORY) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/opencv_run_all_tests_android.sh.in" "${CMAKE_BINARY_DIR}/unix-install/opencv_run_all_tests.sh" @ONLY) install(PROGRAMS "${CMAKE_BINARY_DIR}/unix-install/opencv_run_all_tests.sh" DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT tests) - else() + elseif(WIN32) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/opencv_run_all_tests_windows.cmd.in" + "${CMAKE_BINARY_DIR}/win-install/opencv_run_all_tests.cmd" @ONLY) + install(PROGRAMS "${CMAKE_BINARY_DIR}/win-install/opencv_run_all_tests.cmd" + DESTINATION ${OPENCV_TEST_INSTALL_PATH} COMPONENT tests) + elseif(UNIX) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/opencv_run_all_tests_unix.sh.in" "${CMAKE_BINARY_DIR}/unix-install/opencv_run_all_tests.sh" @ONLY) install(PROGRAMS "${CMAKE_BINARY_DIR}/unix-install/opencv_run_all_tests.sh" DESTINATION ${OPENCV_TEST_INSTALL_PATH} COMPONENT tests) - endif() endif() diff --git a/cmake/templates/opencv_run_all_tests_windows.cmd.in b/cmake/templates/opencv_run_all_tests_windows.cmd.in new file mode 100644 index 0000000000..42bb1432d5 --- /dev/null +++ b/cmake/templates/opencv_run_all_tests_windows.cmd.in @@ -0,0 +1,74 @@ +@echo OFF +setlocal ENABLEDELAYEDEXPANSION + +rem Process command line + +rem This script is designed to allow situations when the tests are installed in +rem a different directory from the library. + +set OPENCV_DIR=%~1 + +if "%OPENCV_DIR%" == "" ( + echo>&2 This script runs the OpenCV tests on Windows. + echo>&2 + echo>&2 usage: %0 ^ + exit /B 1 +) + +if NOT EXIST "%OPENCV_DIR%" ( + echo>&2 error: "%OPENCV_DIR%" doesn't exist +) + +rem Set up paths + +set PATH=%OPENCV_DIR%\@OPENCV_BIN_INSTALL_PATH@;%PATH% +set OPENCV_TEST_PATH=%~dp0 +set OPENCV_TEST_DATA_PATH=%OPENCV_TEST_PATH%\..\testdata + +rem Run tests + +set SUMMARY_STATUS=0 +set FAILED_TESTS= +set PASSED_TESTS= + +for %%t IN ("%OPENCV_TEST_PATH%\opencv_test_*.exe" "%OPENCV_TEST_PATH%\opencv_perf_*.exe") DO ( + set test_name=%%~nt + set report=!test_name!.xml + + set cmd="%%t" --perf_min_samples=1 --perf_force_samples=1 "--gtest_output=xml:!report!" + + echo [!test_name!] RUN : !cmd! + !cmd! + set ret=!errorlevel! + echo [!test_name!] RETURN_CODE : !ret! + + if !ret! EQU 0 ( + echo [!test_name!] OK + set PASSED_TESTS=!PASSED_TESTS! !test_name! + ) ELSE ( + echo [!test_name!] FAILED + set SUMMARY_STATUS=1 + set FAILED_TESTS=!FAILED_TESTS! !test_name! + ) + + echo. +) + +rem Remove temporary test files + +del /F /Q "%TMP%\ocv*.tmp*" + +rem Report final status + +echo =============================================================== +echo PASSED TESTS : %PASSED_TESTS% +echo FAILED TESTS : %FAILED_TESTS% +if %SUMMARY_STATUS% EQU 0 ( + echo STATUS : OK + echo STATUS : All OpenCV tests finished successfully +) ELSE ( + echo STATUS : FAIL + echo STATUS : OpenCV tests finished with status %SUMMARY_STATUS% +) + +exit /B %SUMMARY_STATUS% From 87eb3f6e682fa8f76cb8a548b6c5e82fca1386ec Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Fri, 20 Feb 2015 18:15:20 +0300 Subject: [PATCH 08/10] 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. (cherry picked from commit b8c60234c3fa94c31a3e2a72275fefa811c75d5c) Conflicts: cmake/OpenCVPackaging.cmake --- cmake/OpenCVPackaging.cmake | 45 ++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/cmake/OpenCVPackaging.cmake b/cmake/OpenCVPackaging.cmake index eb26df69bd..d9f1cd5e02 100644 --- a/cmake/OpenCVPackaging.cmake +++ b/cmake/OpenCVPackaging.cmake @@ -59,41 +59,40 @@ set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://opencv.org") #depencencies set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE) -set(CPACK_COMPONENT_samples_DEPENDS libs) -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_COMPONENT_tests_DEPENDS libs) +set(CPACK_COMPONENT_SAMPLES_DEPENDS libs) +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_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}") - set(CPACK_COMPONENT_dev_DEPENDS libs) - 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}") endif() if(NOT OPENCV_CUSTOM_PACKAGE_INFO) - set(CPACK_COMPONENT_libs_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}") - set(CPACK_COMPONENT_libs_DESCRIPTION "Open Computer Vision Library") + set(CPACK_COMPONENT_LIBS_DESCRIPTION "Open Computer Vision Library") + set(CPACK_DEBIAN_COMPONENT_LIBS_NAME "lib${CMAKE_PROJECT_NAME}") - set(CPACK_COMPONENT_python_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-python") - set(CPACK_COMPONENT_python_DESCRIPTION "Python bindings for Open Source Computer Vision Library") + set(CPACK_COMPONENT_PYTHON_DESCRIPTION "Python bindings for Open Source Computer Vision Library") + set(CPACK_DEBIAN_COMPONENT_PYTHON_NAME "lib${CMAKE_PROJECT_NAME}-python") - set(CPACK_COMPONENT_java_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-java") - set(CPACK_COMPONENT_java_DESCRIPTION "Java bindings for Open Source Computer Vision Library") + set(CPACK_COMPONENT_JAVA_DESCRIPTION "Java bindings for Open Source Computer Vision Library") + set(CPACK_DEBIAN_COMPONENT_JAVA_NAME "lib${CMAKE_PROJECT_NAME}-java") - set(CPACK_COMPONENT_dev_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-dev") - set(CPACK_COMPONENT_dev_DESCRIPTION "Development files for Open Source Computer Vision Library") + set(CPACK_COMPONENT_DEV_DESCRIPTION "Development files for Open Source Computer Vision Library") + set(CPACK_DEBIAN_COMPONENT_DEV_NAME "lib${CMAKE_PROJECT_NAME}-dev") - set(CPACK_COMPONENT_docs_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-docs") - set(CPACK_COMPONENT_docs_DESCRIPTION "Documentation for Open Source Computer Vision Library") + set(CPACK_COMPONENT_DOCS_DESCRIPTION "Documentation for Open Source Computer Vision Library") + set(CPACK_DEBIAN_COMPONENT_DOCS_NAME "lib${CMAKE_PROJECT_NAME}-docs") - set(CPACK_COMPONENT_samples_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-samples") - set(CPACK_COMPONENT_samples_DESCRIPTION "Samples for Open Source Computer Vision Library") + set(CPACK_COMPONENT_SAMPLES_DESCRIPTION "Samples for Open Source Computer Vision Library") + set(CPACK_DEBIAN_COMPONENT_SAMPLES_NAME "lib${CMAKE_PROJECT_NAME}-samples") - set(CPACK_COMPONENT_tests_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-tests") - set(CPACK_COMPONENT_tests_DESCRIPTION "Accuracy and performance tests for Open Source Computer Vision Library") + set(CPACK_COMPONENT_TESTS_DESCRIPTION "Accuracy and performance tests for Open Source Computer Vision Library") + set(CPACK_DEBIAN_COMPONENT_TESTS_NAME "lib${CMAKE_PROJECT_NAME}-tests") endif(NOT OPENCV_CUSTOM_PACKAGE_INFO) include(CPack) From 8a732e306fea886478e1982c42664a8bd1369540 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Fri, 20 Feb 2015 18:20:29 +0300 Subject: [PATCH 09/10] Add component display names (cherry picked from commit 6d52ea898442d2458a40f8b06b75320c9ab4a5cc) --- cmake/OpenCVPackaging.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmake/OpenCVPackaging.cmake b/cmake/OpenCVPackaging.cmake index d9f1cd5e02..9ef9436a18 100644 --- a/cmake/OpenCVPackaging.cmake +++ b/cmake/OpenCVPackaging.cmake @@ -57,6 +57,15 @@ set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") set(CPACK_DEBIAN_PACKAGE_SECTION "libs") set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://opencv.org") +#display names +set(CPACK_COMPONENT_DEV_DISPLAY_NAME "Development files") +set(CPACK_COMPONENT_DOCS_DISPLAY_NAME "Documentation") +set(CPACK_COMPONENT_JAVA_DISPLAY_NAME "Java bindings") +set(CPACK_COMPONENT_LIBS_DISPLAY_NAME "Libraries and data") +set(CPACK_COMPONENT_PYTHON_DISPLAY_NAME "Python bindings") +set(CPACK_COMPONENT_SAMPLES_DISPLAY_NAME "Samples") +set(CPACK_COMPONENT_TESTS_DISPLAY_NAME "Tests") + #depencencies set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE) set(CPACK_COMPONENT_SAMPLES_DEPENDS libs) From c71e94f054874c4c7933608e6525240e72ce8fe7 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Fri, 20 Feb 2015 18:37:21 +0300 Subject: [PATCH 10/10] Mark the libs component required Everything else depends on it, after all. (cherry picked from commit cf54e3b97ea13c0aeef5e94b5330a4b26a601d81) Conflicts: cmake/OpenCVPackaging.cmake --- cmake/OpenCVPackaging.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/OpenCVPackaging.cmake b/cmake/OpenCVPackaging.cmake index 9ef9436a18..d88826464a 100644 --- a/cmake/OpenCVPackaging.cmake +++ b/cmake/OpenCVPackaging.cmake @@ -68,6 +68,7 @@ set(CPACK_COMPONENT_TESTS_DISPLAY_NAME "Tests") #depencencies set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE) +set(CPACK_COMPONENT_LIBS_REQUIRED TRUE) set(CPACK_COMPONENT_SAMPLES_DEPENDS libs) set(CPACK_COMPONENT_DEV_DEPENDS libs) set(CPACK_COMPONENT_DOCS_DEPENDS libs)