summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorManuel Bentele2021-12-01 09:10:10 +0100
committerManuel Bentele2021-12-01 09:10:10 +0100
commit31631c04c8081688c3c11588baa50d7a433715a6 (patch)
tree2ae8be8046447b171d087e3657e019f2af14dd17 /cmake
parent[BUILD] Change CMake search for the existence of Linux headers (diff)
downloadxloop-31631c04c8081688c3c11588baa50d7a433715a6.tar.gz
xloop-31631c04c8081688c3c11588baa50d7a433715a6.tar.xz
xloop-31631c04c8081688c3c11588baa50d7a433715a6.zip
Fix issue in CMake kernel header check
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindKernelHeaders.cmake7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmake/FindKernelHeaders.cmake b/cmake/FindKernelHeaders.cmake
index d3ee0d9..53597e5 100644
--- a/cmake/FindKernelHeaders.cmake
+++ b/cmake/FindKernelHeaders.cmake
@@ -17,9 +17,10 @@ endif(NOT KERNEL_INSTALL_DIR)
# find the Linux kernel headers from given KERNEL_BUILD_DIR
find_path(KernelHeaders_INCLUDE_DIR
- NAMES config/clang/version.h
- config/gcc/version.h
- PATHS ${KERNEL_BUILD_DIR}/include)
+ NAMES linux/kernel.h
+ linux/module.h
+ PATHS ${KERNEL_BUILD_DIR}/include
+ NO_DEFAULT_PATH)
# get Linux kernel headers version
string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" KernelHeaders_VERSION ${KernelHeaders_INCLUDE_DIR})