| 1 |
############################################################################ |
| 2 |
# FindVPX.txt |
| 3 |
# Copyright (C) 2014 Belledonne Communications, Grenoble France |
| 4 |
# |
| 5 |
############################################################################ |
| 6 |
# |
| 7 |
# This program is free software; you can redistribute it and/or |
| 8 |
# modify it under the terms of the GNU General Public License |
| 9 |
# as published by the Free Software Foundation; either version 2 |
| 10 |
# of the License, or (at your option) any later version. |
| 11 |
# |
| 12 |
# This program is distributed in the hope that it will be useful, |
| 13 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
# GNU General Public License for more details. |
| 16 |
# |
| 17 |
# You should have received a copy of the GNU General Public License |
| 18 |
# along with this program; if not, write to the Free Software |
| 19 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 20 |
# |
| 21 |
############################################################################ |
| 22 |
# |
| 23 |
# - Find the VPX include file and library |
| 24 |
# |
| 25 |
# VPX_FOUND - system has VPX |
| 26 |
# VPX_INCLUDE_DIRS - the VPX include directory |
| 27 |
# VPX_LIBRARIES - The libraries needed to use VPX |
| 28 |
|
| 29 |
set(_VPX_ROOT_PATHS |
| 30 |
${CMAKE_INSTALL_PREFIX} |
| 31 |
) |
| 32 |
|
| 33 |
find_path(VPX_INCLUDE_DIRS |
| 34 |
NAMES vpx/vpx_encoder.h |
| 35 |
HINTS _VPX_ROOT_PATHS |
| 36 |
PATH_SUFFIXES include |
| 37 |
) |
| 38 |
if(VPX_INCLUDE_DIRS) |
| 39 |
set(HAVE_VPX_VPX_ENCODER_H 1) |
| 40 |
endif() |
| 41 |
|
| 42 |
find_library(VPX_LIBRARIES |
| 43 |
NAMES vpx vpxmd |
| 44 |
HINTS _VPX_ROOT_PATHS |
| 45 |
PATH_SUFFIXES bin lib lib/Win32 |
| 46 |
) |
| 47 |
|
| 48 |
include(FindPackageHandleStandardArgs) |
| 49 |
find_package_handle_standard_args(VPX |
| 50 |
DEFAULT_MSG |
| 51 |
VPX_INCLUDE_DIRS VPX_LIBRARIES HAVE_VPX_VPX_ENCODER_H |
| 52 |
) |
| 53 |
|
| 54 |
mark_as_advanced(VPX_INCLUDE_DIRS VPX_LIBRARIES HAVE_VPX_VPX_ENCODER_H) |