File mediastreamer2-fix-pkgconfig.patch of Package mediastreamer2

diff -urN a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt	2020-02-12 08:32:20.000000000 +0100
+++ b/CMakeLists.txt	2020-03-04 14:54:53.220925208 +0100
@@ -114,6 +114,21 @@
 option(ENABLE_JPEG "Enable JPEG support" YES)
 cmake_dependent_option(ENABLE_QRCODE "Enable QRCode support" YES "ENABLE_VIDEO" NO)
 
+set(MS_PUBLIC_PACKAGES "ortp bctoolbox")
+set(MS_PRIVATE_PACKAGES "${MS_PRIVATE_PACKAGES} libbzrtp")
+set(MS_PRIVATE_PACKAGES "${MS_PRIVATE_PACKAGES} libavcodec libavutil libswscale")
+if(ENABLE_FIXED_POINT)
+       set(MS_PUBLIC_CFLAGS "-DMS_FIXED_POINT")
+else(ENABLE_FIXED_POINT)
+       set(MS_PUBLIC_CFLAGS )
+endif()
+set(prefix ${CMAKE_INSTALL_PREFIX})
+set(exec_prefix ${prefix}/bin)
+set(libdir ${CMAKE_INSTALL_LIBDIR})
+set(includedir ${prefix}/include)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/mediastreamer.pc.in ${CMAKE_CURRENT_BINARY_DIR}/mediastreamer.pc)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/mediastreamer.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
+
 set(CMAKE_CXX_STANDARD 11)
 set(CMAKE_CXX_EXTENSIONS NO)
 
diff -urN a/mediastreamer.pc.in b/mediastreamer.pc.in
--- a/mediastreamer.pc.in	2020-02-12 08:32:20.000000000 +0100
+++ b/mediastreamer.pc.in	2020-03-04 14:57:06.385621735 +0100
@@ -5,7 +5,8 @@
 
 Name: mediastreamer 
 Description: A mediastreaming library for telephony applications
-Requires: ortp bctoolbox
+Requires: @MS_PUBLIC_PACKAGES@
+Requires.private: @MS_PRIVATE_PACKAGES@
 Version: @MEDIASTREAMER_VERSION@
 Libs: -L@libdir@ -lmediastreamer_base -lmediastreamer_voip
 Cflags: -I@includedir@ @MS_PUBLIC_CFLAGS@
openSUSE Build Service is sponsored by