Skip to content

Commit

Permalink
Allow to specify kernel include dirs
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
olsajiri authored and yonghong-song committed May 27, 2020
1 parent 30d8975 commit 82abd2f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/cc/libbpf/src)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endif()

# It's possible to use other kernel headers with
# 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/ ...
include_directories(${KERNEL_INCLUDE_DIRS})

include(cmake/GetGitRevisionDescription.cmake)
include(cmake/version.cmake)
include(CMakeDependentOption)
Expand Down

0 comments on commit 82abd2f

Please sign in to comment.