overte-JulianGro/cmake/macros/TargetWebRTC.cmake
Edgar 7006a1de41
🔧 Reenabled build with WebRTC
This uses a temporary prebuild package to build, it would be better to build WebRTC from sources
2025-02-27 12:31:27 +01:00

23 lines
1 KiB
CMake

#
# Copyright 2019 High Fidelity, Inc.
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
macro(TARGET_WEBRTC)
if (ANDROID)
# I don't yet have working libwebrtc for android
# include(SelectLibraryConfigurations)
# set(INSTALL_DIR ${HIFI_ANDROID_PRECOMPILED}/webrtc/webrtc)
# set(WEBRTC_INCLUDE_DIRS "${INSTALL_DIR}/include/webrtc")
# set(WEBRTC_LIBRARY_DEBUG ${INSTALL_DIR}/debug/lib/libwebrtc.a)
# set(WEBRTC_LIBRARY_RELEASE ${INSTALL_DIR}/lib/libwebrtc.a)
# select_library_configurations(WEBRTC)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
# WebRTC is basically impossible to build on aarch64 Linux.
# I am looking at https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing for an alternative.
else()
find_package(WebRTC REQUIRED)
target_link_libraries(${TARGET_NAME} WebRTC::WebRTC)
endif()
endmacro()