Fixed OpenH264 detection script.

This commit is contained in:
Armin Novak 2014-11-21 10:28:38 +01:00
parent b5d7c30639
commit 402cf2064b

View File

@ -1,6 +1,8 @@
# - Try to find the OpenH264 library
# Once done this will define
#
# OPENH264_ROOT - A list of search hints
#
# OPENH264_FOUND - system has OpenH264
# OPENH264_INCLUDE_DIR - the OpenH264 include directory
# OPENH264_LIBRARIES - libopenh264 library
@ -9,8 +11,11 @@ if (OPENH264_INCLUDE_DIR AND OPENH264_LIBRARY)
set(OPENH264_FIND_QUIETLY TRUE)
endif (OPENH264_INCLUDE_DIR AND OPENH264_LIBRARY)
find_path(OPENH264_INCLUDE_DIR NAMES wels/codec_api.h wels/codec_app_def.h wels/codec_def.h)
find_library(OPENH264_LIBRARY openh264)
find_path(OPENH264_INCLUDE_DIR NAMES wels/codec_api.h wels/codec_app_def.h wels/codec_def.h HINTS ${OPENH264_ROOT})
find_library(OPENH264_LIBRARY NAMES openh264 welsdec PATH_SUFFIXES lib HINTS ${OPENH264_ROOT})
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenH264 DEFAULT_MSG OPENH264_LIBRARY OPENH264_INCLUDE_DIR)
if (OPENH264_INCLUDE_DIR AND OPENH264_LIBRARY)
set(OPENH264_FOUND TRUE)