[graphics/krita/krita/6.0] /: [android] Require ffmpeg libraries

Carsten Hartenfels <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 243bcd3b75c37b3b2b94239553e2508c4470b481 by Carsten Hartenfels.
Committed on 27/07/2026 at 17:19.
Pushed by hartenfels into branch 'krita/6.0'.

[android] Require ffmpeg libraries

To make animation exports work in the subsequent commits. These
libraries are loaded via pkg-config because that's how ffmpeg rolls.

M  +39   -0    CMakeLists.txt

https://invent.kde.org/graphics/krita/-/commit/243bcd3b75c37b3b2b94239553e2508c4470b481

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b45b637ccb6..fe68fd9a409 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1508,6 +1508,45 @@ set_package_properties(Poppler PROPERTIES
     TYPE OPTIONAL
     PURPOSE "Required by the Krita PDF filter.")
 
+##
+## Test for libav on Android
+##
+if(ANDROID)
+    find_package(PkgConfig REQUIRED)
+    set_package_properties(PkgConfig PROPERTIES
+        DESCRIPTION "pkg-config"
+        URL "https://www.freedesktop.org/wiki/Software/pkg-config/"
+        TYPE REQUIRED
+        PURPOSE "Needed to find ffmpeg libraries on Android."
+    )
+
+    pkg_check_modules(LibAV REQUIRED IMPORTED_TARGET GLOBAL
+        libavcodec
+        libavfilter
+        libavformat
+        libavutil
+        libswscale
+    )
+    if(TARGET PkgConfig::LibAV)
+        add_library(LibAV ALIAS PkgConfig::LibAV)
+    endif()
+
+    # The PkgConfig and FeatureSummary modules don't play nice with each other
+    # on their own, so this has to be set manually for the summary to show up.
+    if(TARGET LibAV)
+        set_property(GLOBAL APPEND PROPERTY PACKAGES_FOUND LibAV)
+    else()
+        set_property(GLOBAL APPEND PROPERTY PACKAGES_NOT_FOUND LibAV)
+    endif()
+
+    set_package_properties(LibAV PROPERTIES
+        DESCRIPTION "FFmpeg libraries"
+        URL "https://ffmpeg.org/"
+        TYPE REQUIRED
+        PURPOSE "Needed to render animations and timelapses on Android."
+    )
+endif()
+
 ##
 ## Test for quazip
 ##
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.