summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorPiotr Srebrny <piotr.srebrny@qt.io>2022-03-31 11:43:47 +0200
committerPiotr Srebrny <piotr.srebrny@qt.io>2022-03-31 10:41:11 +0000
commitb3bec3b0014b3f8b1c84e47512c2c3646d912f88 (patch)
tree0a12562cdeaa49cf3095ac337f3059eacab43355 /cmake
parentd12cf8ee588fe69034ef377d7146ab7cbb5ff9b3 (diff)
Prefer explicitly selected FFmpeg lib over available in system
If the FFmpeg library is explicitly selected with FFMPEG_DIR variable during configuration, use it and not the one available with pkgconfig. Change-Id: If1bdf1102b291b61b77ce07aa1d56541a6913d89 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindFFmpeg.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/FindFFmpeg.cmake b/cmake/FindFFmpeg.cmake
index 650f200f3..d48f1072a 100644
--- a/cmake/FindFFmpeg.cmake
+++ b/cmake/FindFFmpeg.cmake
@@ -98,7 +98,7 @@ macro(find_component _component _pkgconfig _library _header)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
- if (PKG_CONFIG_FOUND)
+ if (PKG_CONFIG_FOUND AND NOT FFMPEG_DIR)
pkg_check_modules(PC_${_component} ${_pkgconfig})
endif ()