From patchwork Mon Feb 19 12:50:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Gnatenko X-Patchwork-Id: 10227743 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CDE7A605F5 for ; Mon, 19 Feb 2018 12:51:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BFBFE28765 for ; Mon, 19 Feb 2018 12:51:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B467F28869; Mon, 19 Feb 2018 12:51:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6576828765 for ; Mon, 19 Feb 2018 12:51:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 73A656E153; Mon, 19 Feb 2018 12:51:04 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by gabe.freedesktop.org (Postfix) with ESMTPS id 080316E149 for ; Mon, 19 Feb 2018 12:51:02 +0000 (UTC) Received: by mail-wr0-f195.google.com with SMTP id z12so3353307wrg.4 for ; Mon, 19 Feb 2018 04:51:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CYPRHqlQHJllZntc9e6HUU9GT3bcuI/pYK2GqpQZGuc=; b=HRzWRSKqxkoUrjI4lFFvmvYa8HXokrAgSO/3VA6zFgWoqeejPzpdvxscmB9BYwfYSa xPpSSnq8oAVnamXyIg5WmeBgUfFnPd26eURGkTVPkCIaLN+WSaMFJZzdCnFGFYZSuftI GvO28rPIdpc4WIgEbNVyVaQUCnFpIivH7hm2DQAVWDIRIPh5ciRvbA9WTZeXSyIMLjto nh98w8Q8KH0chrF5+ZNKvbYwb3t/Q4OOMQPLKy8HKrAftlY5q677Lqe/GaxsyJTwHloW kJ4TBoypb+6NUMxTZrbR+YOw+zX3ilUv4psVXoYjlGCmmu9lGqLZOpre+tUU6TN7glwO HudQ== X-Gm-Message-State: APf1xPACbU42NDgd3OoHIFzSZX7nEfyvlvAKG6VECHqvTnGhJOtiOiJM vIgtaW47tIiug8hwLY9dcDXimRv+b1I= X-Google-Smtp-Source: AH8x226uUoNgnSeXHMqxpWQQbvd6n4XH5VTfWW1nqlkdjVyf2GGqZGHcNHvlDpvNa4wJlh/siifLDQ== X-Received: by 10.223.166.171 with SMTP id t40mr12592769wrc.49.1519044661120; Mon, 19 Feb 2018 04:51:01 -0800 (PST) Received: from ignatenko-w541.localdomain.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id d27sm31652954wrd.60.2018.02.19.04.51.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Feb 2018 04:51:00 -0800 (PST) From: Igor Gnatenko To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm] meson: do not use cairo/valgrind if disabled Date: Mon, 19 Feb 2018 13:50:52 +0100 Message-Id: <20180219125052.7639-1-ignatenko@redhat.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180219121516.mcyn6cfmvkgpy7qj@imgtec.com> References: <20180219121516.mcyn6cfmvkgpy7qj@imgtec.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Gnatenko MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP -Dcairo-tests=false currently results into enabling cairo support if it was found. Same for valgrind. v2: * Use underscore-prefixed variables to not change type of variable * Use empty array for "fake" dependency instead of real empty object Signed-off-by: Igor Gnatenko --- meson.build | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 166559e8..e4e21bae 100644 --- a/meson.build +++ b/meson.build @@ -32,8 +32,6 @@ pkg = import('pkgconfig') with_udev = get_option('udev') with_freedreno_kgsl = get_option('freedreno-kgsl') with_install_tests = get_option('install-test-programs') -with_cairo_tests = get_option('cairo-tests') -with_valgrind = get_option('valgrind') config = configuration_data() @@ -226,8 +224,22 @@ endforeach dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : with_intel) dep_cunit = dependency('cunit', version : '>= 2.1', required : false) -dep_cairo = dependency('cairo', required : with_cairo_tests == 'true') -dep_valgrind = dependency('valgrind', required : with_valgrind == 'true') +_cairo_tests = get_option('cairo-tests') +if _cairo_tests != 'false' + dep_cairo = dependency('cairo', required : _cairo_tests == 'true') + with_cairo_tests = dep_cairo.found() +else + dep_cairo = [] + with_cairo_tests = false +endif +_valgrind = get_option('valgrind') +if _valgrind != 'false' + dep_valgrind = dependency('valgrind', required : with_valgrind == 'true') + with_valgrind = dep_valgrind.found() +else + dep_valgrind = [] + with_valgrind = false +endif with_man_pages = get_option('man-pages') prog_xslt = find_program('xsltproc', required : with_man_pages == 'true') @@ -259,8 +271,8 @@ foreach t : [ [with_radeon, 'RADEON'], [with_vc4, 'VC4'], [with_vmwgfx, 'VMWGFX'], - [dep_cairo.found(), 'CAIRO'], - [dep_valgrind.found(), 'VALGRIND'], + [with_cairo_tests, 'CAIRO'], + [with_valgrind, 'VALGRIND'], ] config.set10('HAVE_@0@'.format(t[1]), t[0]) endforeach