Skip to content

Instantly share code, notes, and snippets.

@xdlg
Last active February 2, 2022 22:03
Show Gist options
  • Save xdlg/18830e1cdf53e2e20a435b77fb6d9dd5 to your computer and use it in GitHub Desktop.
Save xdlg/18830e1cdf53e2e20a435b77fb6d9dd5 to your computer and use it in GitHub Desktop.
CMake file with pkgconfig for FFMpeg/libav
cmake_minimum_required(VERSION 3.17)
project(Foo)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBAV REQUIRED IMPORTED_TARGET
libavdevice
libavfilter
libavformat
libavcodec
libswresample
libswscale
libavutil
)
add_executable(${PROJECT_NAME}
main.cpp
)
target_link_libraries(${PROJECT_NAME}
PkgConfig::LIBAV
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment