@
secondwtq 我的 brew 除了 pkg-config 和 cmake 之外没有装其他的,我发现最顶层的 CMakeLists.txt 就有问题,库的路径根本就不对,似乎 cmake 就是由这个配置文件来检查环境并生成 makefile 的:
if (APPLE)
# Default location for thirdparty libs
set(CMAKE_INCLUDE_PATH "../include" "${CMAKE_OSX_SYSROOT}/usr/include")
set(CMAKE_LIBRARY_PATH "../lib")
set(CMAKE_FRAMEWORK_PATH "../Frameworks")
set(BOOST_ROOT "../")
将其改为:
if (APPLE)
# Default location for thirdparty libs
set(CMAKE_INCLUDE_PATH "./include" "${CMAKE_OSX_SYSROOT}/usr/include")
set(CMAKE_LIBRARY_PATH "./lib")
set(CMAKE_FRAMEWORK_PATH "./Frameworks")
set(BOOST_ROOT "./lib")
set(MINIZIP_LIBRARY "./lib/minizip")
可以顺利识别 boost , minizip 和 FFmpeg ,不明白你的为啥就没问题。。。但是这样改后依然还有好多库没识别,待研究。