Skip to content

Commit

Permalink
Merge pull request #701 from dkronst/master
Browse files Browse the repository at this point in the history
Making selection of kernel headers type automatic
  • Loading branch information
drzaeus77 committed Oct 18, 2016
2 parents 163a73f + 799cda9 commit 2035edb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ find_package(LibElf REQUIRED)
# Set to non-zero if system installs kernel headers with split source and build
# directories in /lib/modules/`uname -r`/. This is the case for debian and
# suse, to the best of my knowledge.
if(BCC_KERNEL_HAS_SOURCE_DIR)

if(EXISTS "${ROOT}/lib/modules/${CMAKE_SYSTEM_VERSION}/build" AND EXISTS "${ROOT}/lib/modules/${CMAKE_SYSTEM_VERSION}/source")
message("Building for a split build/source kernel headers package")
set(BCC_KERNEL_HAS_SOURCE_DIR 1)
set(BCC_KERNEL_MODULES_SUFFIX "source")
else()
Expand Down

0 comments on commit 2035edb

Please sign in to comment.