-- Use the system cpu_features package instead of the bundled copy.
-- The bundled copy is not installed as a FreeBSD port dependency.

--- CMakeLists.txt.orig	2026-09-06 00:06:27 UTC
+++ CMakeLists.txt
@@ -159,7 +159,8 @@
         set_source_files_properties("src/filter_fma3.cpp" PROPERTIES COMPILE_FLAGS "-mavx -mfma")
     endif()

-    add_subdirectory(deps/cpu_features EXCLUDE_FROM_ALL)
+    find_package(CpuFeatures REQUIRED)
+    include_directories(${CMAKE_INSTALL_PREFIX}/include/cpu_features)
 endif()

 if(MAKE_BUNDLE)
@@ -182,7 +183,7 @@
 target_include_directories(waveform PRIVATE ${FFTW_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}/include)
 target_link_libraries(waveform PRIVATE OBS::libobs ${FFTW_LIBRARIES})
 if(ENABLE_X86_SIMD)
-    target_link_libraries(waveform PRIVATE cpu_features)
+    target_link_libraries(waveform PRIVATE CpuFeatures::cpu_features)
 endif()
 if(MSVC)
     target_compile_options(waveform PRIVATE "/W4") # warning level
