1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-11-20 23:01:51 +00:00

[CMake] force 'make' usage to build kernel module

It fails when CMake uses Ninja
This commit is contained in:
The Tumultuous Unicorn Of Darkness 2024-10-07 11:07:45 +02:00
parent 7770fffb6a
commit eaa37ce5b6
No known key found for this signature in database
GPG key ID: 1E55EE2EFF18BC1A

View file

@ -26,7 +26,7 @@ else(LIBCPUID_DRIVER_ARM_LINUX_DKMS)
set(DRIVER_SOURCE "${DRIVER_NAME}.c") set(DRIVER_SOURCE "${DRIVER_NAME}.c")
set(DRIVER_OBJECT "${DRIVER_NAME}.o") set(DRIVER_OBJECT "${DRIVER_NAME}.o")
set(DRIVER_MODULE "${DRIVER_NAME}.ko") set(DRIVER_MODULE "${DRIVER_NAME}.ko")
set(KBUILD_CMD "${CMAKE_MAKE_PROGRAM}" EXTRA_CFLAGS="-I${CMAKE_SOURCE_DIR}/libcpuid" -C "${KERNELHEADERS_DIR}" "src=${CMAKE_CURRENT_SOURCE_DIR}" "M=${CMAKE_CURRENT_BINARY_DIR}") set(KBUILD_CMD "make" EXTRA_CFLAGS="-I${CMAKE_SOURCE_DIR}/libcpuid" -C "${KERNELHEADERS_DIR}" "src=${CMAKE_CURRENT_SOURCE_DIR}" "M=${CMAKE_CURRENT_BINARY_DIR}")
configure_file(Makefile.in "${CMAKE_CURRENT_SOURCE_DIR}/Makefile") configure_file(Makefile.in "${CMAKE_CURRENT_SOURCE_DIR}/Makefile")
add_custom_command(OUTPUT "${DRIVER_MODULE}" add_custom_command(OUTPUT "${DRIVER_MODULE}"