使用 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
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。