summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/00-Common.cmake11
-rw-r--r--indra/cmake/CMakeLists.txt1
-rw-r--r--indra/cmake/WebRTC.cmake34
3 files changed, 45 insertions, 1 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index c345cfac5c..4c98983df5 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -87,7 +87,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)
@@ -103,6 +103,11 @@ if (WINDOWS)
string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
endif()
+
+ # workaround for github runner image breakage:
+ # https://github.com/actions/runner-images/issues/10004#issuecomment-2153445161
+ # can be removed after the above issue is resolved and deployed across GHA
+ add_compile_definitions(_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
endif (WINDOWS)
@@ -190,6 +195,10 @@ if (LINUX OR 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 (LINUX OR DARWIN)
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index df05032172..907f08833f 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -65,6 +65,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)
+
+