Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a20d41
commit 16f735b
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# - Try to find libav libavresample | ||
# Once done, this will define | ||
# | ||
# AVResample_FOUND - the library is available | ||
# AVResample_INCLUDE_DIRS - the include directories | ||
# AVResample_LIBRARIES - the libraries | ||
# AVResample_INCLUDE - the file to #include (may be used in config.h) | ||
# | ||
# See documentation on how to write CMake scripts at | ||
# http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries | ||
|
||
include(LibFindMacros) | ||
|
||
libfind_package(AVResample AVUtil) | ||
|
||
|
||
|
||
libfind_pkg_check_modules(AVResample_PKGCONF libavresample) | ||
|
||
find_path(AVResample_INCLUDE_DIR | ||
NAMES libavresample/avresample.h ffmpeg/avresample.h avresample.h | ||
PATHS ${AVResample_PKGCONF_INCLUDE_DIRS} | ||
PATH_SUFFIXES ffmpeg | ||
) | ||
if(AVResample_INCLUDE_DIR) | ||
foreach(suffix libavresample/ ffmpeg/ "") | ||
if(NOT AVResample_INCLUDE) | ||
if(EXISTS "${AVResample_INCLUDE_DIR}/${suffix}avresample.h") | ||
set(AVResample_INCLUDE "${suffix}avresample.h") | ||
endif(EXISTS "${AVResample_INCLUDE_DIR}/${suffix}avresample.h") | ||
endif(NOT AVResample_INCLUDE) | ||
endforeach(suffix) | ||
|
||
if(NOT AVResample_INCLUDE) | ||
message(FATAL_ERROR "Found avresample.h include dir, but not the header file. Perhaps you need to clear CMake cache?") | ||
endif(NOT AVResample_INCLUDE) | ||
endif(AVResample_INCLUDE_DIR) | ||
|
||
find_library(AVResample_LIBRARY | ||
NAMES libavresample.dll.a avresample | ||
PATHS ${AVResample_PKGCONF_LIBRARY_DIRS} | ||
) | ||
|
||
libfind_process(AVResample) |