All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Boccassi <bluca@debian.org>
To: dwarves@vger.kernel.org
Cc: arnaldo.melo@gmail.com
Subject: [PATCH dwarves 1/2] libbpf: if LIBBPF_EMBEDDED=OFF and libbpf-dev/pkgconfig is not available, fail the build
Date: Sun, 13 Jun 2021 14:47:05 +0100	[thread overview]
Message-ID: <20210613134706.26933-1-bluca@debian.org> (raw)

If using the system library was explicitly requested, ensure it is present
and fail the build if it is not, rather than falling back to the
embedded version (same for pkg-config).

Signed-off-by: Luca Boccassi <bluca@debian.org>
---
 CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 669ea59..0f967d1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,9 +4,9 @@ cmake_policy(SET CMP0005 NEW)
 
 option(LIBBPF_EMBEDDED "Use the embedded version of libbpf instead of searching it via pkg-config" ON)
 if (NOT LIBBPF_EMBEDDED)
-	find_package(PkgConfig)
+	find_package(PkgConfig REQUIRED)
 	if(PKGCONFIG_FOUND)
-		pkg_check_modules(LIBBPF libbpf>=0.3.0)
+		pkg_check_modules(LIBBPF REQUIRED libbpf>=0.3.0)
 	endif()
 endif()
 
-- 
2.30.2


             reply	other threads:[~2021-06-13 13:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-13 13:47 Luca Boccassi [this message]
2021-06-13 13:47 ` [PATCH dwarves 2/2] libbpf: bump dependency to >= 0.4.0 Luca Boccassi
2021-06-14 18:34 ` [PATCH dwarves 1/2] libbpf: if LIBBPF_EMBEDDED=OFF and libbpf-dev/pkgconfig is not available, fail the build Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210613134706.26933-1-bluca@debian.org \
    --to=bluca@debian.org \
    --cc=arnaldo.melo@gmail.com \
    --cc=dwarves@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.