forked from panda3d/panda3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFindSWResample.cmake
More file actions
50 lines (44 loc) · 1.45 KB
/
FindSWResample.cmake
File metadata and controls
50 lines (44 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Filename: FindSWResample.cmake
# Author: CFSworks (10 Apr, 2014)
#
# Usage:
# find_package(SWResample [REQUIRED] [QUIET])
#
# Once done this will define:
# SWRESAMPLE_FOUND - system has ffmpeg's libswresample
# SWRESAMPLE_INCLUDE_DIR - the libswresample include directory
# SWRESAMPLE_LIBRARY - the path to the library binary
#
# Find the libswresample include files
find_path(SWRESAMPLE_INCLUDE_DIR
NAMES "libswresample/swresample.h"
PATHS "/usr/include"
"/usr/local/include"
"/sw/include"
"/opt/include"
"/opt/local/include"
"/opt/csw/include"
PATH_SUFFIXES "libav" "ffmpeg"
)
# Find the libswresample library
find_library(SWRESAMPLE_LIBRARY
NAMES "swresample"
PATHS "/usr"
"/usr/local"
"/usr/freeware"
"/sw"
"/opt"
"/opt/csw"
PATH_SUFFIXES "lib" "lib32" "lib64"
)
mark_as_advanced(SWRESAMPLE_INCLUDE_DIR)
mark_as_advanced(SWRESAMPLE_LIBRARY)
# Translate library into library directory
if(SWRESAMPLE_LIBRARY)
unset(SWRESAMPLE_LIBRARY_DIR CACHE)
get_filename_component(SWRESAMPLE_LIBRARY_DIR "${SWRESAMPLE_LIBRARY}" PATH)
set(SWRESAMPLE_LIBRARY_DIR "${SWRESAMPLE_LIBRARY_DIR}" CACHE PATH "The path to libffmpeg's library directory.") # Library path
endif()
mark_as_advanced(SWRESAMPLE_LIBRARY_DIR)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SWResample DEFAULT_MSG SWRESAMPLE_LIBRARY SWRESAMPLE_INCLUDE_DIR SWRESAMPLE_LIBRARY_DIR)