1
# Locate libswscale (part of ffmpeg)
3
# SWSCALE_FOUND - system has swscale
4
# SWSCALE_INCLUDE_DIR - the swscale include directory
5
# SWSCALE_LIBRARIES - the libraries needed to use swscale
6
# SWSCALE_DEFINITIONS - Compiler switches required for using swscale
8
# Copyright (c) 2010, Maciej Mrozowski <reavertm@gmail.com>
10
# Redistribution and use is allowed according to the terms of the BSD license.
11
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
13
include(FindPackageHandleStandardArgs)
15
find_package(PkgConfig)
16
pkg_check_modules(PC_SWSCALE libswscale)
17
set(SWSCALE_DEFINITIONS ${PC_SWSCALE_CFLAGS_OTHER})
19
find_library(SWSCALE_LIBRARIES swscale
20
HINTS ${PC_SWSCALE_LIBDIR} ${PC_SWSCALE_LIBRARY_DIRS}
23
find_path(SWSCALE_INCLUDE_DIR swscale.h
24
HINTS ${PC_SWSCALE_INCLUDEDIR} ${PC_SWSCALE_INCLUDE_DIRS}
25
PATH_SUFFIXES libswscale
28
find_package_handle_standard_args(Swscale "Could not find libswscale; available at www.ffmpeg.org" SWSCALE_LIBRARIES SWSCALE_INCLUDE_DIR)
30
mark_as_advanced(SWSCALE_INCLUDE_DIR SWSCALE_LIBRARIES)