qt_add_ios_ffmpeg_libraries
在 iOS 应用程序捆绑包中嵌入 FFmpeg 二进制文件的辅助函数。
此命令在 Qt 6.8 中引入。
注意: 此命令为技术预览版,可能会在未来版本中更改。
简介
qt_add_ios_ffmpeg_libraries(target)
如果禁用了无版本命令,请使用qt6_add_ios_ffmpeg_libraries()
代替。它支持与此命令相同的参数集。
说明
必须将在线安装程序中的 FFmpeg 二进制文件嵌入到应用程序的捆绑包中。要嵌入 FFmpeg 二进制文件,可在应用程序的 CMakeLists.txt 文件中添加qt_add_ios_ffmpeg_libraries
命令。
该命令将为应用程序目标设置几个属性:
- XCODE_EMBED_FRAMEWORKS,为 XCode 添加信息(嵌入哪些 FFmpeg 二进制文件)。
- XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY 设置为 ON,以便嵌入的 FFmpeg 二进制文件将进行代码签名。
- XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS - 在捆绑包中添加嵌入式 FFmpeg 库的位置。
如果不需要代码签名,可以在命令qt_add_ios_ffmpeg_libraries
之前使用QT_NO_FFMPEG_XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY变量:
set(QT_NO_FFMPEG_XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY ON)
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.