cpu-features provides CMake targets: find_package(CpuFeatures CONFIG REQUIRED) target_link_libraries(main PRIVATE CpuFeatures::cpu_features) find_package(CpuFeaturesNdkCompat CONFIG REQUIRED) target_link_libraries(main PRIVATE CpuFeatures::ndk_compat)