From patchwork Sun Sep 15 01:12:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1971 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 414C460BE6 for ; Sun, 15 Sep 2019 03:13:11 +0200 (CEST) Received: from pendragon.lan (bl10-204-24.dsl.telepac.pt [85.243.204.24]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 184BC23F; Sun, 15 Sep 2019 03:13:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1568509990; bh=8UbIA+FuHv9JjtKrjK28CS4a/2MMwgskJ8Q8WC2nY30=; h=From:To:Cc:Subject:Date:From; b=uJwbR/DsdZcknZspM7FszcEZlHK15zMOD6VhNK/3lfE7MMIZgnm3jK6O6Yz1HC7iz SV8dD75KgomaIQTG9zQf9iDeRu2hkUjJm0fmN85dGifFQc9aLjAfAxIeIJGFK3aRsL rTsBcRvN+LqMhqlb5I5jI2mzEYlqom2b2ZNCnfvw= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sun, 15 Sep 2019 04:12:57 +0300 Message-Id: <20190915011257.11947-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] ipa: Generate the two dummy IPA modules from the same source X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2019 01:13:11 -0000 The ipa_dummy.cpp and ipa_dummy_isolate.cpp only differ in the license reported in the IPAModuleInfo structure. Drop the second file and generate the two .so from ipa_dummy.cpp, with the license defined through the command line. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi --- src/ipa/ipa_dummy.cpp | 2 +- src/ipa/ipa_dummy_isolate.cpp | 47 ----------------------------------- src/ipa/meson.build | 10 ++++---- 3 files changed, 6 insertions(+), 53 deletions(-) delete mode 100644 src/ipa/ipa_dummy_isolate.cpp diff --git a/src/ipa/ipa_dummy.cpp b/src/ipa/ipa_dummy.cpp index 9313aabd2db8..9d0cbdc8b1ad 100644 --- a/src/ipa/ipa_dummy.cpp +++ b/src/ipa/ipa_dummy.cpp @@ -34,7 +34,7 @@ const struct IPAModuleInfo ipaModuleInfo = { 0, "PipelineHandlerVimc", "Dummy IPA for Vimc", - "LGPL-2.1-or-later", + LICENSE, }; IPAInterface *ipaCreate() diff --git a/src/ipa/ipa_dummy_isolate.cpp b/src/ipa/ipa_dummy_isolate.cpp deleted file mode 100644 index cd66626df2df..000000000000 --- a/src/ipa/ipa_dummy_isolate.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* - * Copyright (C) 2019, Google Inc. - * - * ipa_dummy_isolate.cpp - Dummy Image Processing Algorithm module that needs - * to be isolated - */ - -#include - -#include -#include - -namespace libcamera { - -class IPADummyIsolate : public IPAInterface -{ -public: - int init(); -}; - -int IPADummyIsolate::init() -{ - std::cout << "initializing isolated dummy IPA!" << std::endl; - return 0; -} - -/* - * External IPA module interface - */ - -extern "C" { -const struct IPAModuleInfo ipaModuleInfo = { - IPA_MODULE_API_VERSION, - 0, - "PipelineHandlerVimc", - "Dummy IPA for Vimc that needs to be isolated", - "Proprietary", -}; - -IPAInterface *ipaCreate() -{ - return new IPADummyIsolate(); -} -}; - -}; /* namespace libcamera */ diff --git a/src/ipa/meson.build b/src/ipa/meson.build index 2b9863bce3ea..f09915bc1388 100644 --- a/src/ipa/meson.build +++ b/src/ipa/meson.build @@ -1,17 +1,17 @@ ipa_dummy_sources = [ - ['ipa_dummy', 'ipa_dummy.cpp'], - ['ipa_dummy_isolate', 'ipa_dummy_isolate.cpp'], + ['ipa_dummy', 'LGPL-2.1-or-later'], + ['ipa_dummy_isolate', 'Proprietary'], ] ipa_install_dir = join_paths(get_option('libdir'), 'libcamera') foreach t : ipa_dummy_sources - ipa = shared_module(t[0], - t[1], + ipa = shared_module(t[0], 'ipa_dummy.cpp', name_prefix : '', include_directories : libcamera_includes, install : true, - install_dir : ipa_install_dir) + install_dir : ipa_install_dir, + cpp_args : '-DLICENSE="' + t[1] + '"') endforeach config_h.set('IPA_MODULE_DIR',