From patchwork Sun Feb 18 13:00:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Gnatenko X-Patchwork-Id: 10226747 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 2D1B760467 for ; Sun, 18 Feb 2018 13:01:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B92F28ABB for ; Sun, 18 Feb 2018 13:01:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C06228AC5; Sun, 18 Feb 2018 13:01:02 +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 03EA628ABB for ; Sun, 18 Feb 2018 13:01:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8EA378980C; Sun, 18 Feb 2018 13:00:58 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5C2818980C for ; Sun, 18 Feb 2018 13:00:57 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id z12so878922wrg.4 for ; Sun, 18 Feb 2018 05:00:57 -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; bh=hbnem6uIrzJMesPfWvyPEO6XPC3WSKzF380juCuLdpQ=; b=H/qWeC23nodZrUq8G1NlQEuAwiKUu+6R0cK4N30Z8LAn27hzYTKBOZSyl0iJ7QV4RR sEQiRlfVbMnRRuih4gVLwXgnMt+eJs1bJ0skiNUxSWaMBngH9x8jNenEat6N4w9OSY48 ys5c4XOwziPAerBNTfbmb0Q2Xua2Z6SQwetrWtuDpBWlTmOKA2urQwHvhzY9fZ2Sx3ix bIp8qS3JOQBxnntQdw4TR3tso6XxfOYg3YWejtngSbL0rm6LtEfBmTfeX8VvYh9d8abn mkoIVmJicQuziILYfTbrtMYdWmKQchsUb8ffokgtLuUhwPxoepu22SoMBesIsza5fuTZ A5Zw== X-Gm-Message-State: APf1xPB5Iz7Bc9KydGpcPwVaL4WuFt0+oKqajtvVSsWjWWluGiWq2ZzO /3uOZ5nTDJjcKpOyg4BI7q00fIq08b8= X-Google-Smtp-Source: AH8x224Q9k1D1wGgvnxFvyhU+F9l6eodeTti9Bd4VCJYqCa6pq95qlIZJJrhqHSQFKu7D/8qPFr38Q== X-Received: by 10.223.157.135 with SMTP id p7mr10313613wre.33.1518958855486; Sun, 18 Feb 2018 05:00:55 -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 s80sm13483160wrc.93.2018.02.18.05.00.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 18 Feb 2018 05:00:54 -0800 (PST) From: Igor Gnatenko To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm] meson: do not use cairo/valgrind if disabled Date: Sun, 18 Feb 2018 14:00:50 +0100 Message-Id: <20180218130050.17679-1-ignatenko@redhat.com> X-Mailer: git-send-email 2.16.2 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. Signed-off-by: Igor Gnatenko Reviewed-by: Eric Engestrom --- meson.build | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 166559e8..695f89b3 100644 --- a/meson.build +++ b/meson.build @@ -226,8 +226,20 @@ 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') +if with_cairo_tests != 'false' + dep_cairo = dependency('cairo', required : with_cairo_tests == 'true') + with_cairo_tests = dep_cairo.found() +else + dep_cairo = declare_dependency() + with_cairo_tests = false +endif +if with_valgrind != 'false' + dep_valgrind = dependency('valgrind', required : with_valgrind == 'true') + with_valgrind = dep_valgrind.found() +else + dep_valgrind = declare_dependency() + 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