CMake Error at /usr/local/Cellar/cmake/3.21.1/share/cmake/Modules/CMakeFindBinUtils.cmake:217 (message):
Could not find install_name_tool, please check your installation.
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.21.1/share/cmake/Modules/CMakeDetermineASMCompiler.cmake:197 (include)
3rdparty/libpng/CMakeLists.txt:7 (project)
在编译OpneCv 3.4.2 的 ios framework 过程中发生的这个错误,属于opencv和cmake的一个bug。
原因:
OpenCv提供的 build_framework.py 脚本指定了 target device的版本最低到6.0
只编译 armv8和 x86的情况下,会使用高版本device才支持的neon指令集。neon引入后在cmake预编译过程会去加载 CMakeFindBinUtils.cmake,从而导致这个error。
解决:
修改 build_framework.py 将target device限制在9.0及以上版本