ZLMediaKit/cmake/FindAVFORMAT.cmake

17 lines
483 B
CMake
Raw Normal View History

2022-05-28 10:18:40 +08:00
find_path(AVFORMAT_INCLUDE_DIR
NAMES libavformat/avformat.h
HINTS ${FFMPEG_PATH_ROOT}
PATH_SUFFIXES include)
find_library(AVFORMAT_LIBRARY
NAMES avformat
HINTS ${FFMPEG_PATH_ROOT}
PATH_SUFFIXES bin lib)
set(AVFORMAT_LIBRARIES ${AVFORMAT_LIBRARY})
set(AVFORMAT_INCLUDE_DIRS ${AVFORMAT_INCLUDE_DIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(AVFORMAT DEFAULT_MSG AVFORMAT_LIBRARY AVFORMAT_INCLUDE_DIR)