summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2018-05-04 18:16:36 +0200
committerJonathan Bauer2018-05-04 18:16:36 +0200
commitffaf14de6308afc60ea3ec72d5da16ba2817222b (patch)
treeaebf7abb6c46e9b3f7b2d1e6ff03e007e45ea17a
parent[SERVER] Print info about signal sender (diff)
downloaddnbd3-configurable_kernel_version.tar.gz
dnbd3-configurable_kernel_version.tar.xz
dnbd3-configurable_kernel_version.zip
allow user-specified kernel versionconfigurable_kernel_version
instead of always using the running kernel version
-rw-r--r--CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f2da9e5..8efac48 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -191,10 +191,11 @@ endif()
IF(BUILD_KERNEL_MODULE)
SET(MODULE_NAME dnbd3)
SET(MODULE_FILE ${MODULE_NAME}.ko)
+ SET(KERNEL_VERSION ${CMAKE_SYSTEM_VERSION} CACHE STRING "User-specified kernel version")
FILE(GLOB MODULE_SOURCE_FILES src/kernel/*.c src/serialize.c)
FILE(GLOB MODULE_HEADER_FILES src/kernel/*.h)
- SET(KERNEL_DIR "/lib/modules/${CMAKE_SYSTEM_VERSION}/build")
+ SET(KERNEL_DIR "/lib/modules/${KERNEL_VERSION}/build")
SET(KBUILD_COMMAND ${CMAKE_MAKE_PROGRAM} -C ${KERNEL_DIR}
M=${CMAKE_BINARY_DIR} modules
@@ -221,7 +222,7 @@ IF(BUILD_KERNEL_MODULE)
ADD_CUSTOM_TARGET(${MODULE_NAME} ALL DEPENDS ${CMAKE_BINARY_DIR}/${MODULE_FILE})
INSTALL(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.ko
- DESTINATION /lib/modules/${CMAKE_SYSTEM_VERSION}/kernel/drivers/block
+ DESTINATION /lib/modules/${KERNEL_VERSION}/kernel/drivers/block
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)