Skip to content

Commit 82abd2f

Browse files
olsajiriyonghong-song
authored andcommitted
Allow to specify kernel include dirs
It's sometimes convenient to use other kernel headers, now it's possible possible with new KERNEL_INCLUDE_DIRS build variable, like: $ cd <kernel-dir> $ make INSTALL_HDR_PATH=/tmp/headers headers_install $ cd <bcc-dir> $ cmake -DKERNEL_INCLUDE_DIRS=/tmp/headers/include/ ... Signed-off-by: Jiri Olsa <[email protected]>
1 parent 30d8975 commit 82abd2f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CMakeLists.txt

+8
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/cc/libbpf/src)
1919
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
2020
endif()
2121

22+
# It's possible to use other kernel headers with
23+
# KERNEL_INCLUDE_DIRS build variable, like:
24+
# $ cd <kernel-dir>
25+
# $ make INSTALL_HDR_PATH=/tmp/headers headers_install
26+
# $ cd <bcc-dir>
27+
# $ cmake -DKERNEL_INCLUDE_DIRS=/tmp/headers/include/ ...
28+
include_directories(${KERNEL_INCLUDE_DIRS})
29+
2230
include(cmake/GetGitRevisionDescription.cmake)
2331
include(cmake/version.cmake)
2432
include(CMakeDependentOption)

0 commit comments

Comments
 (0)