From patchwork Mon Feb 19 12:55:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Gnatenko X-Patchwork-Id: 10227791 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 2B6CE60392 for ; Mon, 19 Feb 2018 12:55:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1BB8328765 for ; Mon, 19 Feb 2018 12:55:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 10BD128898; Mon, 19 Feb 2018 12:55:36 +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 9763728765 for ; Mon, 19 Feb 2018 12:55:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D95406E154; Mon, 19 Feb 2018 12:55:33 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5F6496E154 for ; Mon, 19 Feb 2018 12:55:32 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id w77so9515217wrc.6 for ; Mon, 19 Feb 2018 04:55:32 -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=/VSgju/Bh2bp3TuxoytrYOU+v0ZQYgsZFcd38/LLNZE=; b=nTd4Y/UMh0HxhOde14aGs/5/rnYktThaUiiNGNxPdorrHNmYbE9iKqlACH/bVf8rfz z7wpkMoWCmgt5Iyc4smVOZpo6HxzecXjt+X8n4X+VCvB4O8yNZFp1TrFGZwhJgtxOH0r dTTebAoXFzKkkVZVwqAUgq2pseh0+LYj1FavKdqztoG05udwq8cermEVgB3DcK6s2H4n Vlr6hvYbWgffaqzlL8XVwZGQEIRaUcFEIeFiHcdN8WH21yoogplmdwfMy/9H8jvs8VwP d4cUKUwEtdgIhiNRc4ldTiU29Il5/BAyftEjMR4kJ0x3Mgy23V3284LTyDofGrJ0CQ0y GLgw== X-Gm-Message-State: APf1xPDp0+G5J2Db4VDu2SzzrWzWcFnCPr5uOh8/NRVDuCeB2D2UDo9h 5F1w+K20G51KUc+k7bKGYuFw9bG1yJo= X-Google-Smtp-Source: AH8x2271SbjXHlav0pj3eqQoz9JU4S6VKNMpBYnOVAwZGtX6brfIsVnukf0Tl7G8s4pqKsOzTzi2WA== X-Received: by 10.223.128.201 with SMTP id 67mr3271473wrl.131.1519044930556; Mon, 19 Feb 2018 04:55:30 -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 59sm7198879wro.6.2018.02.19.04.55.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Feb 2018 04:55:29 -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:55:27 +0100 Message-Id: <20180219125527.8167-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 v3: * Fix typo Reviewed-by: Eric Engestrom 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..7f786a8c 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 : _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