1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2025-06-07 00:51:40 +00:00
libcpuid/drivers/arm/freebsd/CMakeLists.txt
The Tumultuous Unicorn Of Darkness 5fb19a718b
Drivers: force 'make' for Makefile_kmod on FreeBSD
Ninja is not supported with Makefiles.
2025-05-11 21:26:29 +02:00

17 lines
594 B
CMake

set(DRIVER_NAME "cpuid")
set(DRIVER_SOURCE "${DRIVER_NAME}.c")
set(DRIVER_OBJECT "${DRIVER_NAME}.o")
set(DRIVER_MODULE "${DRIVER_NAME}.ko")
configure_file("${DRIVER_SOURCE}" "${CMAKE_CURRENT_BINARY_DIR}/${DRIVER_SOURCE}" COPYONLY)
configure_file(Makefile.in "${CMAKE_CURRENT_BINARY_DIR}/Makefile_kmod")
add_custom_command(OUTPUT "${DRIVER_MODULE}"
COMMAND make -f Makefile_kmod
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
DEPENDS "${DRIVER_SOURCE}"
COMMENT "Building CPUID kernel module for ARM..."
VERBATIM
)
add_custom_target(driver-arm-cpuid ALL DEPENDS "${DRIVER_MODULE}")