Add external_webrtc library.
This commit is contained in:
parent
f8f80b5cb6
commit
fcde3de276
2 changed files with 47 additions and 0 deletions
1
external/CMakeLists.txt
vendored
1
external/CMakeLists.txt
vendored
|
|
@ -59,5 +59,6 @@ if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
||||||
endif()
|
endif()
|
||||||
add_checked_subdirectory(ton)
|
add_checked_subdirectory(ton)
|
||||||
add_checked_subdirectory(variant)
|
add_checked_subdirectory(variant)
|
||||||
|
add_checked_subdirectory(webrtc)
|
||||||
add_checked_subdirectory(xxhash)
|
add_checked_subdirectory(xxhash)
|
||||||
add_checked_subdirectory(zlib)
|
add_checked_subdirectory(zlib)
|
||||||
|
|
|
||||||
46
external/webrtc/CMakeLists.txt
vendored
Normal file
46
external/webrtc/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
# This file is part of Desktop App Toolkit,
|
||||||
|
# a set of libraries for developing nice desktop applications.
|
||||||
|
#
|
||||||
|
# For license and copyright information please follow this link:
|
||||||
|
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
||||||
|
|
||||||
|
add_library(external_webrtc INTERFACE IMPORTED GLOBAL)
|
||||||
|
add_library(desktop-app::external_webrtc ALIAS external_webrtc)
|
||||||
|
|
||||||
|
set(webrtc_loc ${libs_loc}/webrtc/src)
|
||||||
|
set(webrtc_build_loc ${webrtc_loc}/out/$<CONFIG>/obj)
|
||||||
|
if (WIN32)
|
||||||
|
set(webrtc_lib_prefix $<CONFIG>/)
|
||||||
|
set(webrtc_lib_suffix .lib)
|
||||||
|
|
||||||
|
target_compile_definitions(external_webrtc
|
||||||
|
INTERFACE
|
||||||
|
WEBRTC_WIN
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set(webrtc_lib_prefix lib)
|
||||||
|
set(webrtc_lib_suffix .a)
|
||||||
|
|
||||||
|
target_compile_definitions(external_webrtc
|
||||||
|
INTERFACE
|
||||||
|
WEBRTC_POSIX
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(external_webrtc
|
||||||
|
INTERFACE
|
||||||
|
${webrtc_loc}
|
||||||
|
${webrtc_loc}/third_party/abseil-cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(webrtc_libs
|
||||||
|
webrtc
|
||||||
|
)
|
||||||
|
foreach (lib ${webrtc_libs})
|
||||||
|
list(APPEND webrtc_libs_list "${webrtc_build_loc}/${lib}${webrtc_lib_suffix}")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
target_link_libraries(external_webrtc
|
||||||
|
INTERFACE
|
||||||
|
${webrtc_libs_list}
|
||||||
|
)
|
||||||
Loading…
Add table
Reference in a new issue