diff options
author | Manuel Bentele | 2020-10-13 16:19:21 +0200 |
---|---|---|
committer | Manuel Bentele | 2020-10-13 16:19:21 +0200 |
commit | 111a2350ac1967b62ffa3024371819c812c46844 (patch) | |
tree | e31808a39291fe3bfa53e921a51dc74be36468ae /CMakeLists.txt | |
parent | Added separate Linux kernel install directory and added version to kernel mod... (diff) | |
download | xloop-111a2350ac1967b62ffa3024371819c812c46844.tar.gz xloop-111a2350ac1967b62ffa3024371819c812c46844.tar.xz xloop-111a2350ac1967b62ffa3024371819c812c46844.zip |
Added support to keep track of kernel file changes in CMake
With this patch, CMake keeps track of changes to original xloop Linux
kernel source files. CMake will copy each file if a change is detected
without rebuiling the CMake build and cache files.
Futhrmore, changed default paths of udev rules and xloop kernel modules
to be installed.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e1f8eac..54a949a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,8 +9,6 @@ project(xloop DESCRIPTION "xloop Linux kernel modules and utility" LANGUAGES C) -include(GNUInstallDirs) - # define project specific settings set(BLK_DEV_XLOOP_MIN_COUNT 8 CACHE STRING "Number of xloop devices to pre-create at init time") @@ -20,9 +18,9 @@ set(XLOOP_CTRL_MINOR 15 CACHE STRING "Minor number for the xloop-control device") # set Linux kernel directories -set(KERNEL_BUILD_DIR "/${CMAKE_INSTALL_LIBDIR}/modules/${CMAKE_SYSTEM_VERSION}/build" +set(KERNEL_BUILD_DIR "/lib/modules/${CMAKE_SYSTEM_VERSION}/build" CACHE PATH "Path to Linux kernel modules to compile against") -set(KERNEL_INSTALL_DIR "/${CMAKE_INSTALL_LIBDIR}/modules/${CMAKE_SYSTEM_VERSION}/extra" +set(KERNEL_INSTALL_DIR "/lib/modules/${CMAKE_SYSTEM_VERSION}/extra" CACHE PATH "Path to install Linux kernel modules") # print configured settings @@ -74,12 +72,12 @@ if(${CMAKE_BUILD_TYPE} MATCHES Release) set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA ${CMAKE_CURRENT_BINARY_DIR}/package/deb/postinst ${CMAKE_CURRENT_BINARY_DIR}/package/deb/postrm) # set RPM generator specific packaging options - set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/${CMAKE_INSTALL_LIBDIR}" - "/${CMAKE_INSTALL_LIBDIR}/modules" - "/${CMAKE_INSTALL_LIBDIR}/modules/${CMAKE_SYSTEM_VERSION}" - "/${CMAKE_INSTALL_LIBDIR}/modules/${CMAKE_SYSTEM_VERSION}/extra" - "/${CMAKE_INSTALL_LIBDIR}/udev" - "/${CMAKE_INSTALL_LIBDIR}/udev/rules.d" + set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/lib" + "/lib/modules" + "/lib/modules/${CMAKE_SYSTEM_VERSION}" + "/lib/modules/${CMAKE_SYSTEM_VERSION}/extra" + "/lib/udev" + "/lib/udev/rules.d" "${CPACK_PACKAGING_INSTALL_PREFIX}/share/bash-completion" "${CPACK_PACKAGING_INSTALL_PREFIX}/share/bash-completion/completions" "${CPACK_PACKAGING_INSTALL_PREFIX}/share/man" |