From 9fc8b732737f139d3e466510d75668ab45578960 Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 8 Mar 2016 21:02:53 +0100 Subject: sync with upstream --- project/cmake/modules/FindRTMP.cmake | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 project/cmake/modules/FindRTMP.cmake (limited to 'project/cmake/modules/FindRTMP.cmake') diff --git a/project/cmake/modules/FindRTMP.cmake b/project/cmake/modules/FindRTMP.cmake new file mode 100644 index 0000000..432b77d --- /dev/null +++ b/project/cmake/modules/FindRTMP.cmake @@ -0,0 +1,21 @@ +# - Try to find rtmp +# Once done this will define +# +# RTMP_FOUND - system has librtmp +# RTMP_INCLUDE_DIRS - the librtmp include directory +# RTMP_LIBRARIES - The librtmp libraries + +if(PKG_CONFIG_FOUND) + pkg_check_modules (RTMP librtmp) + list(APPEND RTMP_INCLUDE_DIRS ${RTMP_INCLUDEDIR}) +else() + find_path(RTMP_INCLUDE_DIRS librtmp/rtmp.h) + find_library(RTMP_LIBRARIES rtmp) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(RTMP DEFAULT_MSG RTMP_INCLUDE_DIRS RTMP_LIBRARIES) + +list(APPEND RTMP_DEFINITIONS -DHAS_LIBRTMP=1) + +mark_as_advanced(RTMP_INCLUDE_DIRS RTMP_LIBRARIES RTMP_DEFINITIONS) -- cgit v1.2.3