From patchwork Thu Jun 25 19:59:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Martin X-Patchwork-Id: 488533 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 7C22D1401E7 for ; Fri, 26 Jun 2015 06:00:21 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=QtGYLnl2; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 431E295D76; Thu, 25 Jun 2015 20:00:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Lh0BvHHVBtv0; Thu, 25 Jun 2015 20:00:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 65B9B95D6D; Thu, 25 Jun 2015 20:00:18 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id A71C11CE508 for ; Thu, 25 Jun 2015 20:00:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A3767A4197 for ; Thu, 25 Jun 2015 20:00:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ynYEhvv5Jaei for ; Thu, 25 Jun 2015 20:00:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by fraxinus.osuosl.org (Postfix) with ESMTPS id D0906A41A5 for ; Thu, 25 Jun 2015 20:00:11 +0000 (UTC) Received: by wibdq8 with SMTP id dq8so85899183wib.1 for ; Thu, 25 Jun 2015 13:00:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dsKbDBuqmRpyARbTYDUJsuJ83eMQBZgu+E3XPwKaXr4=; b=QtGYLnl2NFSr1OR4dU/0dYCEyh3vpsqOt1vH2PQHXsKvGONjoCCcH/Pm+Oz9IdI9En i41zYFK8jDjPUaCI99LFxWzdvl3liwCtuA3KBuPAzWLy+Rq8HMhsw3tWLXMfMfjM64Ly emROfKKGH0iyt/1yEFvxL7RO8oEtVh2TbJ6Dgv0APx9NjntPC0MjBS1+asVOfS5csIoe uH5yiyBYdTzUUU0Y3yH++wgVqe1tupshyh6dV8wF6TazPzttMmdQT7LFRFVtMYs8Ex0U +Il+meC441J+7VVUbzDMPENw4oQyHGXtBApvYUjukcHKaZ+eD+MSULMGrQBULdGJ+p50 NHQA== X-Received: by 10.194.109.97 with SMTP id hr1mr31374317wjb.95.1435262410526; Thu, 25 Jun 2015 13:00:10 -0700 (PDT) Received: from bobook.localdomain (ivr94-4-82-229-165-48.fbx.proxad.net. [82.229.165.48]) by mx.google.com with ESMTPSA id hn7sm47218600wjc.16.2015.06.25.13.00.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 Jun 2015 13:00:09 -0700 (PDT) From: Samuel Martin To: buildroot@buildroot.org Date: Thu, 25 Jun 2015 21:59:45 +0200 Message-Id: <1435262397-888-5-git-send-email-s.martin49@gmail.com> X-Mailer: git-send-email 2.4.4 In-Reply-To: <1435262397-888-1-git-send-email-s.martin49@gmail.com> References: <1435262397-888-1-git-send-email-s.martin49@gmail.com> Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH v6 04/16] package/opencv: define modules inter-dependencies X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" OpenCV allows to enable/disable the selection of modules (a.k.a. opencv libraries). These modules depend one on the others; these dependencies are already handled by the build-system (CMake). However, the way we handled them in Buildroot was not really clean. For each opencv module, there is a kconfig option, but we forced the corresponding CMake config option without checking for the modules' dependencies. This patch replicates the modules' dependency relations in the Config.in, so that the selection of the user will actually be built. Signed-off-by: Samuel Martin Cc: Vicente Olivert Riera Cc: "Yann E. MORIN" Reviewed-by: "Yann E. MORIN" --- changes v5->v6: - rebase changes v4->v5: - rebase - remove Reviewed-by tag form Yann (because of the changes introduced with the version bump) changes v3->v4: - rebase - update ts module dependencies changes v2->v3: - rebase - fix typo in commit log (Yann) - update A/R/T tags changes v1->v2: - rebase --- package/opencv/Config.in | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/package/opencv/Config.in b/package/opencv/Config.in index 95e1e13..87f4bf5 100644 --- a/package/opencv/Config.in +++ b/package/opencv/Config.in @@ -21,6 +21,8 @@ comment "OpenCV modules" config BR2_PACKAGE_OPENCV_LIB_CALIB3D bool "calib3d" default y + select BR2_PACKAGE_OPENCV_LIB_FEATURES2D + select BR2_PACKAGE_OPENCV_LIB_IMGPROC help Include opencv_calib3d module into the OpenCV build. @@ -29,12 +31,16 @@ config BR2_PACKAGE_OPENCV_LIB_CALIB3D config BR2_PACKAGE_OPENCV_LIB_FEATURES2D bool "features2d" default y + select BR2_PACKAGE_OPENCV_LIB_FLANN + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_ML help Include opencv_features2d module into the OpenCV build. config BR2_PACKAGE_OPENCV_LIB_FLANN bool "flann" default y + # opencv_core dependency is already enabled help Include opencv_flann module into the OpenCV build. @@ -44,36 +50,46 @@ config BR2_PACKAGE_OPENCV_LIB_FLANN config BR2_PACKAGE_OPENCV_LIB_HIGHGUI bool "highgui" default y + select BR2_PACKAGE_OPENCV_LIB_IMGCODECS + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_VIDEOIO help Include opencv_highgui module into the OpenCV build. config BR2_PACKAGE_OPENCV_LIB_IMGCODECS bool "imgcodecs (image codecs)" default y + select BR2_PACKAGE_OPENCV_LIB_IMGPROC help Include opencv_imgcodecs module into the OpenCV build. config BR2_PACKAGE_OPENCV_LIB_IMGPROC bool "imgproc (image processing)" default y + # opencv_core dependency is already enabled help Include opencv_imgproc module into the OpenCV build. config BR2_PACKAGE_OPENCV_LIB_ML bool "ml (machine learning)" default y + # opencv_core dependency is already enabled help Include opencv_ml module into the OpenCV build. config BR2_PACKAGE_OPENCV_LIB_OBJDETECT bool "objdetect" default y + # opencv_core dependency is already enabled + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_ML help Include opencv_objdetect module into the OpenCV build. config BR2_PACKAGE_OPENCV_LIB_PHOTO bool "photo" default y + select BR2_PACKAGE_OPENCV_LIB_IMGPROC help Include opencv_photo module into the OpenCV build. @@ -82,44 +98,65 @@ comment "opencv_python module requires numpy which is not yet available." config BR2_PACKAGE_OPENCV_LIB_SHAPE bool "shape (shape descriptors and matchers)" default y + # opencv_core dependency is already enabled + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_VIDEO help Include opencv_shape module into the OpenCV build. config BR2_PACKAGE_OPENCV_LIB_STITCHING bool "stitching" default y + select BR2_PACKAGE_OPENCV_LIB_CALIB3D + select BR2_PACKAGE_OPENCV_LIB_FEATURES2D + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_OBJDETECT help Include opencv_stitching module into the OpenCV build. config BR2_PACKAGE_OPENCV_LIB_SUPERRES bool "superres" default y + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_VIDEO help Include opencv_superres "super resolution" - module into the OpenCV build. config BR2_PACKAGE_OPENCV_LIB_TS bool "ts (touchscreen)" - select BR2_PACKAGE_OPENCV_LIB_HIGHGUI default y + # opencv_core dependency is already enabled + select BR2_PACKAGE_OPENCV_LIB_HIGHGUI + select BR2_PACKAGE_OPENCV_LIB_IMGCODECS + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_VIDEOIO help Include opencv_ts module into the OpenCV build. config BR2_PACKAGE_OPENCV_LIB_VIDEOIO bool "videoio (media i/o)" default y + select BR2_PACKAGE_OPENCV_LIB_IMGCODECS + select BR2_PACKAGE_OPENCV_LIB_IMGPROC help Include opencv_videoio module into the OpenCV build. config BR2_PACKAGE_OPENCV_LIB_VIDEO bool "video" default y + select BR2_PACKAGE_OPENCV_LIB_IMGPROC help Include opencv_video module into the OpenCV build. config BR2_PACKAGE_OPENCV_LIB_VIDEOSTAB bool "videostab" default y + select BR2_PACKAGE_OPENCV_LIB_CALIB3D + select BR2_PACKAGE_OPENCV_LIB_FEATURES2D + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_PHOTO + select BR2_PACKAGE_OPENCV_LIB_VIDEO help Include opencv_videostab module into the OpenCV build.