--- src/corelib/CMakeLists.txt.orig	2025-11-12 05:17:57.000000000 -0500
+++ src/corelib/CMakeLists.txt	2026-01-08 08:34:04.022255000 -0500
@@ -416,6 +416,13 @@
     target_link_libraries(Platform INTERFACE Threads::Threads)
 endif()
 
+if(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
+  target_link_libraries(Core PRIVATE kvm procstat)
+endif()
+if(CMAKE_SYSTEM_NAME STREQUAL MidnightBSD)
+  target_link_libraries(Core PRIVATE kvm procstat)
+endif()
+
 # Skip AUTOMOC processing of qobject.cpp and its headers.
 # We do this on purpose, because qobject.cpp contains a bunch of Q_GADGET, Q_NAMESPACE, etc
 # keywords and AUTOMOC gets confused about wanting to compile a qobject.moc file as well.
