From 3bed6f4e86e82735a5fee6912ac75c158b51a4ff Mon Sep 17 00:00:00 2001 From: Pavel Dubsky Date: Fri, 22 Nov 2024 23:35:47 +0100 Subject: [PATCH] Introduce FFmpeg-related configure options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently there're two FFmpeg-specific CMake arguments used by Qt Multimedia to enable building with FFmpeg support: - FFMPEG_DIR: Specifies the directory path of the FFmpeg development libraries. The new -ffmpeg-dir configure option maps to this variable. - QT_DEPLOY_FFMPEG: Determines whether FFmpeg binaries should be copied to Qt's install directory. The new -ffmpeg-deploy configure option maps to this variable. [ChangeLog][configure] `-DFFMPEG_DIR=` and `-DQT_DEPLOY_FFMPEG=ON` can now be set via `-ffmpeg-dir ` and `-ffmpeg-deploy` respectively. Change-Id: Iaff4da99be2682730653178e3b3fef46cfa0bc63 Reviewed-by: Alexandru Croitor Reviewed-by: Joerg Bornemann Reviewed-by: Jøger Hansegård Reviewed-by: Artem Dyomin --- cmake/QtProcessConfigureArgs.cmake | 3 +++ cmake/configure-cmake-mapping.md | 2 ++ qt_cmdline.cmake | 2 ++ 3 files changed, 7 insertions(+) diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake index 687a3a0bab3..b6736c4044c 100644 --- a/cmake/QtProcessConfigureArgs.cmake +++ b/cmake/QtProcessConfigureArgs.cmake @@ -1049,6 +1049,9 @@ if("${INPUT_ltcg}" STREQUAL "yes") endforeach() endif() +translate_path_input(ffmpeg-dir FFMPEG_DIR) +translate_boolean_input(ffmpeg-deploy QT_DEPLOY_FFMPEG) + translate_list_input(device-option QT_QMAKE_DEVICE_OPTIONS) translate_list_input(defines QT_EXTRA_DEFINES) translate_list_input(fpaths QT_EXTRA_FRAMEWORKPATHS) diff --git a/cmake/configure-cmake-mapping.md b/cmake/configure-cmake-mapping.md index a5a811bb2f0..d861f337130 100644 --- a/cmake/configure-cmake-mapping.md +++ b/cmake/configure-cmake-mapping.md @@ -179,3 +179,5 @@ The following table describes the mapping of configure options to CMake argument | | | types: gzip, zstd, none. | | -force-bundled-libs | -DFEATURE_force_bundled_libs=ON | | | -force-system-libs | -DFEATURE_force_system_libs=ON | | +| -ffmpeg-dir | -DFFMPEG_DIR= | FFmpeg development libraries directory | +| -ffmpeg-deploy | -DQT_DEPLOY_FFMPEG=ON | FFmpeg binaries will be copied to Qt's install directory | diff --git a/qt_cmdline.cmake b/qt_cmdline.cmake index d2545c912eb..f85a8e6a66f 100644 --- a/qt_cmdline.cmake +++ b/qt_cmdline.cmake @@ -129,6 +129,8 @@ qt_commandline_option(xplatform TYPE string) qt_commandline_option(zlib CONTROLS_FEATURE TYPE enum NAME system-zlib MAPPING system yes qt no) qt_commandline_option(zstd TYPE boolean) qt_commandline_option(coverage TYPE optionalString VALUES gcov) +qt_commandline_option(ffmpeg-dir TYPE string) +qt_commandline_option(ffmpeg-deploy TYPE boolean) qt_commandline_prefix(D defines) qt_commandline_prefix(F fpaths) qt_commandline_prefix(I includes)