diff options
author | Pierre Ossman <ossman@cendio.se> | 2022-05-30 10:53:32 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2022-06-07 10:06:32 +0200 |
commit | 101cef956de048160ddd80f1aaa6e80df0f530fa (patch) | |
tree | 141f3b9b046fc7ba90c72da3f30fd06ea82a770c /cmake/Modules | |
parent | 4cf31302a1dd887e72481ed4355a9f435d91eb6c (diff) | |
download | tigervnc-101cef956de048160ddd80f1aaa6e80df0f530fa.tar.gz tigervnc-101cef956de048160ddd80f1aaa6e80df0f530fa.zip |
Find FFMPEG using pkg-config
This is the standard method of finding it on Unix systems, so make sure
we use it. Still keep a fallback, though, for other systems, e.g.
Windows.
Diffstat (limited to 'cmake/Modules')
-rw-r--r-- | cmake/Modules/FindFfmpeg.cmake | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cmake/Modules/FindFfmpeg.cmake b/cmake/Modules/FindFfmpeg.cmake new file mode 100644 index 00000000..cf09fa4a --- /dev/null +++ b/cmake/Modules/FindFfmpeg.cmake @@ -0,0 +1,17 @@ +find_package(PkgConfig) + +if (PKG_CONFIG_FOUND) + pkg_check_modules(AVCODEC libavcodec) + pkg_check_modules(AVUTIL libavutil) + pkg_check_modules(SWSCALE libswscale) +else() + find_path(AVCODEC_INCLUDE_DIRS NAMES avcodec.h PATH_SUFFIXES libavcodec) + find_library(AVCODEC_LIBRARIES NAMES avcodec) + find_package_handle_standard_args(AVCODEC DEFAULT_MSG AVCODEC_LIBRARIES AVCODEC_INCLUDE_DIRS) + find_path(AVUTIL_INCLUDE_DIRS NAMES avutil.h PATH_SUFFIXES libavutil) + find_library(AVUTIL_LIBRARIES NAMES avutil) + find_package_handle_standard_args(AVUTIL DEFAULT_MSG AVUTIL_LIBRARIES AVUTIL_INCLUDE_DIRS) + find_path(SWSCALE_INCLUDE_DIRS NAMES swscale.h PATH_SUFFIXES libswscale) + find_library(SWSCALE_LIBRARIES NAMES swscale) + find_package_handle_standard_args(SWSCALE DEFAULT_MSG SWSCALE_LIBRARIES SWSCALE_INCLUDE_DIRS) +endif() |