summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/00-Common.cmake6
-rw-r--r--indra/cmake/CMakeLists.txt1
-rw-r--r--indra/cmake/WebRTC.cmake34
3 files changed, 40 insertions, 1 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index b7fb49dc55..7de12d0063 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -88,7 +88,7 @@ if (WINDOWS)
if( ADDRESS_SIZE EQUAL 32 )
add_compile_options( /arch:SSE2 )
endif()
-
+
# Are we using the crummy Visual Studio KDU build workaround?
if (NOT VS_DISABLE_FATAL_WARNINGS)
add_compile_options(/WX)
@@ -228,6 +228,10 @@ if (DARWIN)
list(APPEND GCC_WARNINGS -Wno-reorder -Wno-non-virtual-dtor )
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13)
+ list(APPEND GCC_WARNINGS -Wno-unused-but-set-variable -Wno-unused-variable )
+ endif()
+
add_compile_options(${GCC_WARNINGS})
add_compile_options(-m${ADDRESS_SIZE})
endif ()
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index 793ee1365f..be56ef102d 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -63,6 +63,7 @@ set(cmake_SOURCE_FILES
ViewerMiscLibs.cmake
VisualLeakDetector.cmake
LibVLCPlugin.cmake
+ WebRTC.cmake
XmlRpcEpi.cmake
xxHash.cmake
ZLIBNG.cmake
diff --git a/indra/cmake/WebRTC.cmake b/indra/cmake/WebRTC.cmake
new file mode 100644
index 0000000000..d336dcdb10
--- /dev/null
+++ b/indra/cmake/WebRTC.cmake
@@ -0,0 +1,34 @@
+# -*- 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")
+if (NOT USESYSTEMLIBS)
+use_prebuilt_binary(webrtc)
+endif ()
+
+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)
+
+