Only conflict with packages corresponding to modules that are built
authorRoman Donchenko <roman.donchenko@itseez.com>
Wed, 26 Aug 2015 10:42:21 +0000 (13:42 +0300)
committerAlexander Smorkalov <alexander.smorkalov@itseez.com>
Thu, 17 Sep 2015 10:39:03 +0000 (13:39 +0300)
cmake/OpenCVPackaging.cmake

index be52aee..f6d5bd0 100644 (file)
@@ -120,8 +120,10 @@ set(STD_OPENCV_DEV libopencv-dev)
 
 foreach(module calib3d contrib core features2d flann gpu highgui imgproc legacy
                ml objdetect ocl photo stitching superres ts video videostab)
-  list(APPEND STD_OPENCV_LIBS "libopencv-${module}2.4")
-  list(APPEND STD_OPENCV_DEV "libopencv-${module}-dev")
+  if(HAVE_opencv_${module})
+    list(APPEND STD_OPENCV_LIBS "libopencv-${module}2.4")
+    list(APPEND STD_OPENCV_DEV "libopencv-${module}-dev")
+  endif()
 endforeach()
 
 string(REPLACE ";" ", " CPACK_COMPONENT_LIBS_CONFLICTS "${STD_OPENCV_LIBS}")