- Qt 6.12
- Qt Multimedia
- qt_add_ios_ffmpeg_libraries
- Qt 6.12.0 Reference Documentation

# qt_add_ios_ffmpeg_libraries

Auxiliary function which embeds FFmpeg binaries in iOS app bundle.

The command is defined in the `Multimedia` component of the `Qt6` package, which can be loaded like so:

     find_package(Qt6 REQUIRED COMPONENTS Multimedia)

This command was introduced in Qt 6.8.

Note: This command is in technology preview and may change in future releases.

## Synopsis

     qt_add_ios_ffmpeg_libraries(target)

If versionless commands are disabled, use `qt6_add_ios_ffmpeg_libraries()` instead. It supports the same set of arguments as this command.

## Description

FFmpeg binaries from the online installer must be embedded into the application's bundle. To embed FFmpeg binaries, you can add the `qt_add_ios_ffmpeg_libraries` command to an executable target within the project's CMakeLists.txt file.

The function must be called on an executable target. It cannot be used on library targets or interface targets. If your project is a library that links to Qt Multimedia, the executable that it is linked into must call this function.

This command will set several properties for the application target:

- XCODE_EMBED_FRAMEWORKS, adds the informatioin for XCode (which FFmpeg binaries to embed).
- XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY is set to ON, so that the embedded FFmpeg binaries will be code-signed.
- XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS - to add the location of embedded FFmpeg libraries within the bundle.

If code-signing is not required, you can use the QT_NO_FFMPEG_XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY variable before the command `qt_add_ios_ffmpeg_libraries`:

     set(QT_NO_FFMPEG_XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY ON)

Note: `qt_add_ios_ffmpeg_libraries` requires CMake 3.28 or later.