diff options
Diffstat (limited to 'indra/cmake')
| -rw-r--r-- | indra/cmake/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | indra/cmake/LLWebRTC.cmake | 1 | ||||
| -rw-r--r-- | indra/cmake/WebRTC.cmake | 43 | 
3 files changed, 45 insertions, 0 deletions
| diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 1fd83eadff..8a77d0b882 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/LLWebRTC.cmake b/indra/cmake/LLWebRTC.cmake new file mode 100644 index 0000000000..913e28c2ff --- /dev/null +++ b/indra/cmake/LLWebRTC.cmake @@ -0,0 +1 @@ +# -*- cmake -*-
\ No newline at end of file diff --git a/indra/cmake/WebRTC.cmake b/indra/cmake/WebRTC.cmake new file mode 100644 index 0000000000..f8ce9c8104 --- /dev/null +++ b/indra/cmake/WebRTC.cmake @@ -0,0 +1,43 @@ +# -*- cmake -*- +include(CMakeCopyIfDifferent) + +include(Linking) + +include_guard() + +set(WEBRTC_ROOT ${CMAKE_BINARY_DIR}/../../webrtc/src) +file(COPY ${WEBRTC_ROOT}/out/Default/obj/webrtc.lib +    DESTINATION ${CMAKE_BINARY_DIR}/packages/lib/release +) +set(WEBRTC_INCLUDE_DIR ${CMAKE_BINARY_DIR}/packages/include/webrtc) +file(MAKE_DIRECTORY ${WEBRTC_INCLUDE_DIR}) + +file(COPY ${WEBRTC_ROOT}/api +          ${WEBRTC_ROOT}/media/base  +          ${WEBRTC_ROOT}/media/engine +          ${WEBRTC_ROOT}/rtc_base +          ${WEBRTC_ROOT}/pc +          ${WEBRTC_ROOT}/p2p +          ${WEBRTC_ROOT}/call +          ${WEBRTC_ROOT}/media +          ${WEBRTC_ROOT}/system_wrappers +          ${WEBRTC_ROOT}/common_video +          ${WEBRTC_ROOT}/video +          ${WEBRTC_ROOT}/common_audio +          ${WEBRTC_ROOT}/logging +          ${WEBRTC_ROOT}/third_party/abseil-cpp/absl +    DESTINATION ${WEBRTC_INCLUDE_DIR} +    FILES_MATCHING PATTERN "*.h" +) + +add_library(ll::webrtc STATIC IMPORTED) + +if (LINUX) +  target_link_libraries( ll::webrtc INTERFACE ../webrtc/src/obj/Default/webrtc) +elseif (DARWIN) +  target_link_libraries( ll::webrtc INTERFACE ../webrtc/src/obj/Default/webrtc) +elseif (WINDOWS) +  set_target_properties( ll::webrtc PROPERTIES IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/packages/lib/release/webrtc.lib) +  target_link_libraries( ll::webrtc INTERFACE ${CMAKE_BINARY_DIR}/packages/lib/release/webrtc.lib) +endif (LINUX) +target_include_directories( ll::webrtc INTERFACE "${WEBRTC_INCLUDE_DIR}") | 
