【MLT编译问题】"PkgConfig:xml" includes non-existent path
文章目录
使用 cmake .. 编译 mlt 框架时,遇到了如下问题:
CMake Error in src/modules/xml/CMakeLists.txt:
Imported target "PkgConfig::xml" includes non-existent path
"/usr/include/libxml2"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
* The path was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and references files it does not
provide.
通过查看 mlt 中关于 libxml2 的配置可以发现在 CMakeLists.txt 中通过 pkgconfig 添加的依赖。
具体的原因应该是和 cmake 和 pkgconfig 的语法相关,通过查询资料,得到如下解决方案,亲测可行:
-
通过
brew info libxml2查看libxml2的安装路径- 路径为:
/usr/local/Cellar/libxml2/2.9.9_2
- 路径为:
-
打开该路径下的
lib/pkgconfig/libxml-2.0.pc文件把 includedir=${prefix}/include 修改为 includedir=${pc_sysrootdir}${prefix}/include
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论