Added pkg-config to cmake OpenH264 detection.
# OPENH264_INCLUDE_DIR - the OpenH264 include directory
# OPENH264_LIBRARIES - libopenh264 library
+if (UNIX AND NOT ANDROID)
+ find_package(PkgConfig QUIET)
+ pkg_check_modules(PC_OPENH264 QUIET openh264)
+endif (UNIX AND NOT ANDROID)
+
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
PATH_SUFFIXES include
- HINTS ${OPENH264_ROOT})
+ HINTS ${OPENH264_ROOT} ${PC_OPENH264_INCLUDE_DIRS})
find_library(OPENH264_LIBRARY
NAMES openh264_dll openh264 welsdec
PATH_SUFFIXES lib
- HINTS ${OPENH264_ROOT})
+ HINTS ${OPENH264_ROOT} ${PC_OPENH264_LIBRARY_DIRS})
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenH264 DEFAULT_MSG OPENH264_LIBRARY OPENH264_INCLUDE_DIR)
