--- plugins/cpu/CMakeLists.txt.orig	2026-05-06 12:50:32 UTC
+++ plugins/cpu/CMakeLists.txt
@@ -5,7 +5,7 @@
 add_library(ksystemstats_plugin_cpu MODULE  cpu.cpp cpuplugin.cpp loadaverages.cpp usagecomputer.cpp)
 if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
     target_sources(ksystemstats_plugin_cpu PRIVATE linuxcpu.cpp linuxcpuplugin.cpp)
-elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD|MidnightBSD")
     target_sources(ksystemstats_plugin_cpu PRIVATE freebsdcpuplugin.cpp)
 endif()
 
