summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorManuel Bentele2020-10-12 16:44:52 +0200
committerManuel Bentele2020-10-12 16:44:52 +0200
commitccb981c4b403d7bbd962b281082b656b741e905f (patch)
treec57e6301bb9d520aeb47aab57c4e6b378f8a4970 /cmake
parentAdded debug support for xlosetup and documented debugging in README (diff)
downloadxloop-ccb981c4b403d7bbd962b281082b656b741e905f.tar.gz
xloop-ccb981c4b403d7bbd962b281082b656b741e905f.tar.xz
xloop-ccb981c4b403d7bbd962b281082b656b741e905f.zip
Added separate Linux kernel install directory and added version to kernel modules
Diffstat (limited to 'cmake')
-rw-r--r--cmake/version.cmake9
1 files changed, 3 insertions, 6 deletions
diff --git a/cmake/version.cmake b/cmake/version.cmake
index da3951d..1cae665 100644
--- a/cmake/version.cmake
+++ b/cmake/version.cmake
@@ -4,12 +4,9 @@
# Copyright (C) 2020 Manuel Bentele <development@manuel-bentele.de>
#
-# macro to get Linux kernel version
-macro(get_kernel_version LINUX_KERNEL_VERSION)
- execute_process(COMMAND uname -r
- OUTPUT_VARIABLE UNAME_RESULT
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" LINUX_KERNEL_VERSION ${UNAME_RESULT})
+# macro to get Linux kernel version from KERNEL_BUILD_DIR
+macro(get_kernel_version LINUX_KERNEL_VERSION KERNEL_BUILD_DIR)
+ string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" LINUX_KERNEL_VERSION ${KERNEL_BUILD_DIR})
endmacro(get_kernel_version)
# macro to get short hash of latest commit