lib_tgcalls.cmake 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. # This file is part of Telegram Desktop,
  2. # the official desktop application for the Telegram messaging service.
  3. #
  4. # For license and copyright information please follow this link:
  5. # https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. add_library(lib_tgcalls STATIC)
  7. init_target(lib_tgcalls) # Can't use std::optional::value on macOS.
  8. add_library(tdesktop::lib_tgcalls ALIAS lib_tgcalls)
  9. set(tgcalls_dir ${third_party_loc}/tgcalls)
  10. set(tgcalls_loc ${tgcalls_dir}/tgcalls)
  11. nice_target_sources(lib_tgcalls ${tgcalls_loc}
  12. PRIVATE
  13. Instance.cpp
  14. Instance.h
  15. )
  16. nice_target_sources(lib_tgcalls ${tgcalls_loc}
  17. PRIVATE
  18. AudioDeviceHelper.cpp
  19. AudioDeviceHelper.h
  20. ChannelManager.cpp
  21. ChannelManager.h
  22. CodecSelectHelper.cpp
  23. CodecSelectHelper.h
  24. CryptoHelper.cpp
  25. CryptoHelper.h
  26. DirectConnectionChannel.h
  27. EncryptedConnection.cpp
  28. EncryptedConnection.h
  29. FakeAudioDeviceModule.cpp
  30. FakeAudioDeviceModule.h
  31. FieldTrialsConfig.cpp
  32. FieldTrialsConfig.h
  33. InstanceImpl.cpp
  34. InstanceImpl.h
  35. LogSinkImpl.cpp
  36. LogSinkImpl.h
  37. Manager.cpp
  38. Manager.h
  39. MediaManager.cpp
  40. MediaManager.h
  41. Message.cpp
  42. Message.h
  43. NetworkManager.cpp
  44. NetworkManager.h
  45. SctpDataChannelProviderInterfaceImpl.cpp
  46. SctpDataChannelProviderInterfaceImpl.h
  47. StaticThreads.cpp
  48. StaticThreads.h
  49. ThreadLocalObject.h
  50. TurnCustomizerImpl.cpp
  51. TurnCustomizerImpl.h
  52. VideoCaptureInterface.cpp
  53. VideoCaptureInterface.h
  54. VideoCaptureInterfaceImpl.cpp
  55. VideoCaptureInterfaceImpl.h
  56. VideoCapturerInterface.h
  57. utils/gzip.cpp
  58. utils/gzip.h
  59. v2/ContentNegotiation.cpp
  60. v2/ContentNegotiation.h
  61. v2/DirectNetworkingImpl.cpp
  62. v2/DirectNetworkingImpl.h
  63. v2/ExternalSignalingConnection.cpp
  64. v2/ExternalSignalingConnection.h
  65. v2/InstanceNetworking.h
  66. v2/InstanceV2ReferenceImpl.cpp
  67. v2/InstanceV2ReferenceImpl.h
  68. v2/InstanceV2Impl.cpp
  69. v2/InstanceV2Impl.h
  70. v2/NativeNetworkingImpl.cpp
  71. v2/NativeNetworkingImpl.h
  72. v2/ReflectorPort.cpp
  73. v2/ReflectorPort.h
  74. v2/ReflectorRelayPortFactory.cpp
  75. v2/ReflectorRelayPortFactory.h
  76. v2/Signaling.cpp
  77. v2/Signaling.h
  78. v2/SignalingConnection.cpp
  79. v2/SignalingConnection.h
  80. v2/SignalingEncryption.cpp
  81. v2/SignalingEncryption.h
  82. v2/SignalingSctpConnection.cpp
  83. v2/SignalingSctpConnection.h
  84. # Desktop capturer
  85. desktop_capturer/DesktopCaptureSource.h
  86. desktop_capturer/DesktopCaptureSource.cpp
  87. desktop_capturer/DesktopCaptureSourceHelper.h
  88. desktop_capturer/DesktopCaptureSourceHelper.cpp
  89. desktop_capturer/DesktopCaptureSourceManager.h
  90. desktop_capturer/DesktopCaptureSourceManager.cpp
  91. # Group calls
  92. group/AVIOContextImpl.cpp
  93. group/AVIOContextImpl.h
  94. group/AudioStreamingPart.cpp
  95. group/AudioStreamingPart.h
  96. group/AudioStreamingPartInternal.cpp
  97. group/AudioStreamingPartInternal.h
  98. group/AudioStreamingPartPersistentDecoder.cpp
  99. group/AudioStreamingPartPersistentDecoder.h
  100. group/GroupInstanceCustomImpl.cpp
  101. group/GroupInstanceCustomImpl.h
  102. group/GroupInstanceImpl.h
  103. group/GroupJoinPayloadInternal.cpp
  104. group/GroupJoinPayloadInternal.h
  105. group/GroupJoinPayload.h
  106. group/GroupNetworkManager.cpp
  107. group/GroupNetworkManager.h
  108. group/StreamingMediaContext.cpp
  109. group/StreamingMediaContext.h
  110. group/VideoStreamingPart.cpp
  111. group/VideoStreamingPart.h
  112. platform/PlatformInterface.h
  113. # Android
  114. platform/android/AndroidContext.cpp
  115. platform/android/AndroidContext.h
  116. platform/android/AndroidInterface.cpp
  117. platform/android/AndroidInterface.h
  118. platform/android/VideoCameraCapturer.cpp
  119. platform/android/VideoCameraCapturer.h
  120. platform/android/VideoCapturerInterfaceImpl.cpp
  121. platform/android/VideoCapturerInterfaceImpl.h
  122. # iOS / macOS
  123. platform/darwin/CustomSimulcastEncoderAdapter.cpp
  124. platform/darwin/CustomSimulcastEncoderAdapter.h
  125. platform/darwin/DarwinFFMpeg.h
  126. platform/darwin/DarwinFFMpeg.mm
  127. platform/darwin/DarwinInterface.h
  128. platform/darwin/DarwinInterface.mm
  129. platform/darwin/DarwinVideoSource.h
  130. platform/darwin/DarwinVideoSource.mm
  131. platform/darwin/DesktopSharingCapturer.h
  132. platform/darwin/DesktopSharingCapturer.mm
  133. platform/darwin/ExtractCVPixelBuffer.h
  134. platform/darwin/ExtractCVPixelBuffer.mm
  135. platform/darwin/GLVideoView.h
  136. platform/darwin/GLVideoView.mm
  137. platform/darwin/GLVideoViewMac.h
  138. platform/darwin/GLVideoViewMac.mm
  139. platform/darwin/h265_nalu_rewriter.cc
  140. platform/darwin/h265_nalu_rewriter.h
  141. platform/darwin/objc_video_encoder_factory.h
  142. platform/darwin/objc_video_encoder_factory.mm
  143. platform/darwin/objc_video_decoder_factory.h
  144. platform/darwin/objc_video_decoder_factory.mm
  145. platform/darwin/RTCCodecSpecificInfoH265+Private.h
  146. platform/darwin/RTCCodecSpecificInfoH265.h
  147. platform/darwin/RTCCodecSpecificInfoH265.mm
  148. platform/darwin/RTCH265ProfileLevelId.h
  149. platform/darwin/RTCH265ProfileLevelId.mm
  150. platform/darwin/TGCMIOCapturer.h
  151. platform/darwin/TGCMIOCapturer.m
  152. platform/darwin/TGCMIODevice.h
  153. platform/darwin/TGCMIODevice.mm
  154. platform/darwin/TGRTCCVPixelBuffer.h
  155. platform/darwin/TGRTCCVPixelBuffer.mm
  156. platform/darwin/TGRTCDefaultVideoDecoderFactory.h
  157. platform/darwin/TGRTCDefaultVideoDecoderFactory.mm
  158. platform/darwin/TGRTCDefaultVideoEncoderFactory.h
  159. platform/darwin/TGRTCDefaultVideoEncoderFactory.mm
  160. platform/darwin/TGRTCVideoDecoderH264.h
  161. platform/darwin/TGRTCVideoDecoderH264.mm
  162. platform/darwin/TGRTCVideoDecoderH265.h
  163. platform/darwin/TGRTCVideoDecoderH265.mm
  164. platform/darwin/TGRTCVideoEncoderH264.h
  165. platform/darwin/TGRTCVideoEncoderH264.mm
  166. platform/darwin/TGRTCVideoEncoderH265.h
  167. platform/darwin/TGRTCVideoEncoderH265.mm
  168. platform/darwin/VideoCameraCapturer.h
  169. platform/darwin/VideoCameraCapturer.mm
  170. platform/darwin/VideoCameraCapturerMac.h
  171. platform/darwin/VideoCameraCapturerMac.mm
  172. platform/darwin/VideoCapturerInterfaceImpl.h
  173. platform/darwin/VideoCapturerInterfaceImpl.mm
  174. platform/darwin/VideoCMIOCapture.h
  175. platform/darwin/VideoCMIOCapture.mm
  176. platform/darwin/VideoMetalView.h
  177. platform/darwin/VideoMetalView.mm
  178. platform/darwin/VideoMetalViewMac.h
  179. platform/darwin/VideoMetalViewMac.mm
  180. # POSIX
  181. # Teleram Desktop
  182. platform/tdesktop/DesktopInterface.cpp
  183. platform/tdesktop/DesktopInterface.h
  184. platform/tdesktop/VideoCapturerInterfaceImpl.cpp
  185. platform/tdesktop/VideoCapturerInterfaceImpl.h
  186. platform/tdesktop/VideoCapturerTrackSource.cpp
  187. platform/tdesktop/VideoCapturerTrackSource.h
  188. platform/tdesktop/VideoCameraCapturer.cpp
  189. platform/tdesktop/VideoCameraCapturer.h
  190. # third-party
  191. third-party/json11.cpp
  192. third-party/json11.hpp
  193. )
  194. target_link_libraries(lib_tgcalls
  195. PRIVATE
  196. desktop-app::external_webrtc
  197. desktop-app::external_ffmpeg
  198. desktop-app::external_openssl
  199. desktop-app::external_rnnoise
  200. desktop-app::external_zlib
  201. )
  202. target_compile_definitions(lib_tgcalls
  203. PUBLIC
  204. TGCALLS_USE_STD_OPTIONAL
  205. PRIVATE
  206. WEBRTC_APP_TDESKTOP
  207. RTC_ENABLE_H265
  208. RTC_ENABLE_VP9
  209. )
  210. if (WIN32)
  211. elseif (APPLE)
  212. target_compile_options(lib_tgcalls
  213. PRIVATE
  214. -fobjc-arc
  215. )
  216. remove_target_sources(lib_tgcalls ${tgcalls_loc}
  217. platform/darwin/GLVideoView.h
  218. platform/darwin/GLVideoView.mm
  219. platform/darwin/GLVideoViewMac.h
  220. platform/darwin/GLVideoViewMac.mm
  221. platform/darwin/VideoCameraCapturer.h
  222. platform/darwin/VideoCameraCapturer.mm
  223. platform/darwin/VideoMetalView.h
  224. platform/darwin/VideoMetalView.mm
  225. platform/darwin/VideoMetalViewMac.h
  226. platform/darwin/VideoMetalViewMac.mm
  227. platform/tdesktop/DesktopInterface.cpp
  228. platform/tdesktop/DesktopInterface.h
  229. platform/tdesktop/VideoCapturerInterfaceImpl.cpp
  230. platform/tdesktop/VideoCapturerInterfaceImpl.h
  231. platform/tdesktop/VideoCapturerTrackSource.cpp
  232. platform/tdesktop/VideoCapturerTrackSource.h
  233. platform/tdesktop/VideoCameraCapturer.cpp
  234. platform/tdesktop/VideoCameraCapturer.h
  235. )
  236. endif()
  237. target_compile_options_if_exists(lib_tgcalls
  238. PRIVATE
  239. -Wno-deprecated-volatile
  240. -Wno-ambiguous-reversed-operator
  241. -Wno-deprecated-declarations
  242. -Wno-unqualified-std-cast-call
  243. -Wno-unused-function
  244. )
  245. remove_target_sources(lib_tgcalls ${tgcalls_loc}
  246. platform/android/AndroidContext.cpp
  247. platform/android/AndroidContext.h
  248. platform/android/AndroidInterface.cpp
  249. platform/android/AndroidInterface.h
  250. platform/android/VideoCameraCapturer.cpp
  251. platform/android/VideoCameraCapturer.h
  252. platform/android/VideoCapturerInterfaceImpl.cpp
  253. platform/android/VideoCapturerInterfaceImpl.h
  254. reference/InstanceImplReference.cpp
  255. reference/InstanceImplReference.h
  256. )
  257. target_include_directories(lib_tgcalls
  258. PUBLIC
  259. ${tgcalls_dir}
  260. PRIVATE
  261. ${tgcalls_loc}
  262. )
  263. add_library(lib_tgcalls_legacy STATIC)
  264. init_target(lib_tgcalls_legacy)
  265. add_library(tdesktop::lib_tgcalls_legacy ALIAS lib_tgcalls_legacy)
  266. nice_target_sources(lib_tgcalls_legacy ${tgcalls_loc}
  267. PRIVATE
  268. legacy/InstanceImplLegacy.cpp
  269. legacy/InstanceImplLegacy.h
  270. )
  271. target_include_directories(lib_tgcalls_legacy
  272. PRIVATE
  273. ${tgcalls_loc}
  274. )
  275. target_link_libraries(lib_tgcalls_legacy
  276. PRIVATE
  277. tdesktop::lib_tgcalls
  278. tdesktop::lib_tgvoip
  279. desktop-app::external_openssl
  280. )