File mediastreamer2-fix-pkgconfig.patch of Package mediastreamer2

diff -ru a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt	2020-06-15 19:27:04.000000000 +0200
+++ b/CMakeLists.txt	2020-06-26 11:13:58.863403760 +0200
@@ -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 14)
 set(CMAKE_CXX_EXTENSIONS NO)
 
diff -ru a/mediastreamer.pc.in b/mediastreamer.pc.in
--- a/mediastreamer.pc.in	2020-06-15 19:27:04.000000000 +0200
+++ b/mediastreamer.pc.in	2020-06-26 11:14:44.219319903 +0200
@@ -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