vcpkg/ports/opencv4/0022-android-use-vcpkg-cpu-...

16 lines
485 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2dc1aaa..04332e2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -805,7 +805,9 @@ endif()
# ----------------------------------------------------------------------------
if(ANDROID AND WITH_CPUFEATURES)
- add_subdirectory(3rdparty/cpufeatures)
+ find_package(CpuFeaturesNdkCompat CONFIG REQUIRED)
+ set(CPUFEATURES_INCLUDE_DIRS "")
+ set(CPUFEATURES_LIBRARIES CpuFeatures::ndk_compat)
set(HAVE_CPUFEATURES 1)
endif()