cmake: Make libbpf's Linux UAPI headers available to all binaries

Now that libbpf is used to implement deduplicated strings container, all
of the binaries will need linux/btf.h header to compile properly. libbpf
is distributed with its own copies of Linux UAPI headers, so use them
during compilation.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Cc: dwarves@vger.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Andrii Nakryiko 2020-10-24 11:36:53 -07:00 committed by Arnaldo Carvalho de Melo
parent 8cac1c54c8
commit ec3f944102
1 changed files with 3 additions and 1 deletions

View File

@ -2,7 +2,9 @@ project(pahole C)
cmake_minimum_required(VERSION 2.8.8)
cmake_policy(SET CMP0005 NEW)
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} )
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/lib/bpf/include/uapi)
# Try to parse this later, Helio just showed me a KDE4 example to support
# x86-64 builds.