18 |
18 |
19 if (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR) |
19 if (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR) |
20 # in cache already |
20 # in cache already |
21 set(FFMPEG_FOUND TRUE) |
21 set(FFMPEG_FOUND TRUE) |
22 else (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR) |
22 else (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR) |
|
23 # silence output option |
|
24 if (FFMPEG_FIND_QUIETLY) |
|
25 set(VERBOSITY "QUIET") |
|
26 else () |
|
27 set(VERBOSITY "") |
|
28 endif () |
23 # use pkg-config to get the directories and then use these values |
29 # use pkg-config to get the directories and then use these values |
24 # in the FIND_PATH() and FIND_LIBRARY() calls |
30 # in the FIND_PATH() and FIND_LIBRARY() calls |
25 find_package(PkgConfig) |
31 find_package(PkgConfig) |
26 if (PKG_CONFIG_FOUND) |
32 if (PKG_CONFIG_FOUND) |
27 pkg_check_modules(_FFMPEG_AVCODEC libavcodec) |
33 pkg_check_modules(_FFMPEG_AVCODEC libavcodec ${VERBOSITY}) |
28 pkg_check_modules(_FFMPEG_AVFORMAT libavformat) |
34 pkg_check_modules(_FFMPEG_AVFORMAT libavformat ${VERBOSITY}) |
29 pkg_check_modules(_FFMPEG_AVUTIL libavutil) |
35 pkg_check_modules(_FFMPEG_AVUTIL libavutil ${VERBOSITY}) |
30 endif (PKG_CONFIG_FOUND) |
36 endif (PKG_CONFIG_FOUND) |
31 |
37 |
32 find_path(FFMPEG_AVCODEC_INCLUDE_DIR |
38 find_path(FFMPEG_AVCODEC_INCLUDE_DIR |
33 NAMES libavcodec/avcodec.h |
39 NAMES libavcodec/avcodec.h |
34 PATHS ${_FFMPEG_AVCODEC_INCLUDE_DIRS} |
40 PATHS ${_FFMPEG_AVCODEC_INCLUDE_DIRS} |