Fixed FFMPEG detection without pkgconfig

This commit is contained in:
Armin Novak 2021-07-20 10:57:28 +02:00 коммит произвёл akallabeth
Родитель 0d79670a28
Коммит 2c31c36759
1 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -27,12 +27,20 @@ find_library(AVUTIL_LIBRARY avutil PATHS ${AVUTIL_LIBRARY_DIRS})
# swresample
find_path(SWRESAMPLE_INCLUDE_DIR libswresample/swresample.h PATHS ${SWRESAMPLE_INCLUDE_DIRS})
find_library(SWRESAMPLE_LIBRARY swresample PATHS ${SWRESAMPLE_LIBRARY_DIRS})
find_library(SWRESAMPLE_LIBRARY NAMES swresample swresample-3 PATHS ${SWRESAMPLE_LIBRARY_DIRS})
if (SWRESAMPLE_INCLUDE_DIR AND SWRESAMPLE_LIBRARY)
set(SWRESAMPLE_FOUND ON)
endif()
# avresample
find_path(AVRESAMPLE_INCLUDE_DIR libavresample/avresample.h PATHS ${AVRESAMPLE_INCLUDE_DIRS})
find_library(AVRESAMPLE_LIBRARY avresample PATHS ${AVRESAMPLE_LIBRARY_DIRS})
if (AVRESAMPLE_INCLUDE_DIR AND AVRESAMPLE_LIBRARY)
set(AVRESAMPLE_FOUND ON)
endif()
if (AVCODEC_INCLUDE_DIR AND AVCODEC_LIBRARY)
set(AVCODEC_FOUND TRUE)
endif(AVCODEC_INCLUDE_DIR AND AVCODEC_LIBRARY)