]> git.pld-linux.org Git - packages/mediastreamer.git/blame - mediastreamer-cmake-upnp.patch
Merge branch 'DEVEL-cmake'
[packages/mediastreamer.git] / mediastreamer-cmake-upnp.patch
CommitLineData
dcc4ee79
JB
1--- mediastreamer2-4.5.22/CMakeLists.txt.orig 2021-07-09 20:43:58.295679157 +0200
2+++ mediastreamer2-4.5.22/CMakeLists.txt 2021-07-09 21:46:38.291976177 +0200
3@@ -81,6 +81,8 @@ option(ENABLE_PACKAGE_SOURCE "Create 'pa
4 option(ENABLE_SRTP "Build with the SRTP transport support." YES)
5 cmake_dependent_option(ENABLE_ZRTP "Build with ZRTP support." YES "ENABLE_SRTP" NO)
6
7+option(ENABLE_UPNP "Build with UPnP support." YES)
8+
9 option(ENABLE_SOUND "Can be used to turn off all possible sound backends." YES)
10 cmake_dependent_option(ENABLE_ALSA "Enable ALSA support." YES "ENABLE_SOUND;LINUX_OR_BSD" NO)
11 cmake_dependent_option(ENABLE_ANDROIDSND "Enable Android sound support." NO "ENABLE_SOUND;ANDROID" NO)
12@@ -161,6 +163,13 @@ if(ENABLE_PCAP)
13 find_package(PCAP QUIET)
14 endif()
15
16+if(ENABLE_UPNP)
17+ find_library(UPNP upnp)
18+ if(NOT UPNP)
19+ message(WARNING "Could not find UPNP library.")
20+ set(ENABLE_UPNP OFF CACHE BOOL "Build with UPnP support." FORCE)
21+ endif()
22+endif()
23 if(ENABLE_SRTP)
24 find_package(SRTP)
25 if(NOT SRTP_FOUND)
26@@ -402,6 +411,11 @@ endif()
27 if(HAVE_DLOPEN)
28 list(APPEND LINK_LIBS dl)
29 endif()
30+if(ENABLE_UPNP)
31+ list(APPEND LINK_LIBS upnp ixml)
32+ list(APPEND MEDIASTREAMER2_INCLUDE_DIRS /usr/include/upnp)
33+ add_definitions(-D_GNU_SOURCE)
34+endif()
35 if(ALSA_FOUND)
36 list(APPEND LINK_LIBS asound)
37 list(APPEND MEDIASTREAMER2_INCLUDE_DIRS ${ALSA_INCLUDE_DIRS})
38--- mediastreamer2-4.5.22/src/CMakeLists.txt.orig 2021-07-09 21:45:54.498880091 +0200
39+++ mediastreamer2-4.5.22/src/CMakeLists.txt 2021-07-09 21:45:58.885522993 +0200
40@@ -140,6 +140,15 @@ if (APPLE)
41 list(APPEND VOIP_SOURCE_FILES_OBJC utils/apple_utils.h utils/apple_utils.m)
42 endif()
43
44+if(ENABLE_UPNP)
45+ list(APPEND VOIP_SOURCE_FILES_C
46+ upnp/upnp_igd.c
47+ upnp/upnp_igd_private.h
48+ upnp/upnp_igd_cmd.c
49+ upnp/upnp_igd_utils.c
50+ upnp/upnp_igd_utils.h
51+ )
52+endif()
53 if(ENABLE_ALSA)
54 list(APPEND VOIP_SOURCE_FILES_C audiofilters/alsa.c)
55 endif()
This page took 0.107313 seconds and 4 git commands to generate.