1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-11-30 23:05:48 +00:00
libcpuid/drivers/arm/freebsd/CMakeLists.txt
2024-07-10 20:17:10 +02:00

17 lines
613 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 "${CMAKE_MAKE_PROGRAM}" -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}")