summaryrefslogtreecommitdiff
path: root/indra/cmake/WebRTC.cmake
diff options
context:
space:
mode:
authorBrad Linden <46733234+brad-linden@users.noreply.github.com>2024-06-20 16:02:10 -0700
committerGitHub <noreply@github.com>2024-06-20 16:02:10 -0700
commit68963019cd62fedf94ade25c83f22804ec237818 (patch)
tree958d58f7e236ec6d1f5773ef30300a5e3314e832 /indra/cmake/WebRTC.cmake
parent2515f422cfea1d2ad6947022636c1e3a70f4b282 (diff)
parenta52391d582ec7299273d3ff38efdb2455da7700e (diff)
Merge pull request #1791 from secondlife/brad/webrtc-voice-develop
webrtc-voice merge to develop
Diffstat (limited to 'indra/cmake/WebRTC.cmake')
-rw-r--r--indra/cmake/WebRTC.cmake32
1 files changed, 32 insertions, 0 deletions
diff --git a/indra/cmake/WebRTC.cmake b/indra/cmake/WebRTC.cmake
new file mode 100644
index 0000000000..230522a40a
--- /dev/null
+++ b/indra/cmake/WebRTC.cmake
@@ -0,0 +1,32 @@
+# -*- cmake -*-
+include(Linking)
+include(Prebuilt)
+
+include_guard()
+
+add_library( ll::webrtc INTERFACE IMPORTED )
+target_include_directories( ll::webrtc SYSTEM INTERFACE "${LIBS_PREBUILT_DIR}/include/webrtc" "${LIBS_PREBUILT_DIR}/include/webrtc/third_party/abseil-cpp")
+use_prebuilt_binary(webrtc)
+
+if (WINDOWS)
+ target_link_libraries( ll::webrtc INTERFACE webrtc.lib )
+elseif (DARWIN)
+ FIND_LIBRARY(COREAUDIO_LIBRARY CoreAudio)
+ FIND_LIBRARY(COREGRAPHICS_LIBRARY CoreGraphics)
+ FIND_LIBRARY(AUDIOTOOLBOX_LIBRARY AudioToolbox)
+ FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation)
+ FIND_LIBRARY(COCOA_LIBRARY Cocoa)
+
+ target_link_libraries( ll::webrtc INTERFACE
+ libwebrtc.a
+ ${COREAUDIO_LIBRARY}
+ ${AUDIOTOOLBOX_LIBRARY}
+ ${COREGRAPHICS_LIBRARY}
+ ${COREFOUNDATION_LIBRARY}
+ ${COCOA_LIBRARY}
+ )
+elseif (LINUX)
+ target_link_libraries( ll::webrtc INTERFACE libwebrtc.a X11 )
+endif (WINDOWS)
+
+