Skip to content

Commit

Permalink
Add _DISABLE_WEBRTC_INTEGRATION option.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Aug 11, 2020
1 parent 83150a4 commit b372364
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
4 changes: 3 additions & 1 deletion external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
endif()
add_checked_subdirectory(ton)
add_checked_subdirectory(variant)
add_checked_subdirectory(webrtc)
if (NOT DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION)
add_checked_subdirectory(webrtc)
endif()
add_checked_subdirectory(xxhash)
add_checked_subdirectory(zlib)
7 changes: 7 additions & 0 deletions options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ if (DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
)
endif()

if (DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION)
target_compile_definitions(common_options
INTERFACE
DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION
)
endif()

if (DESKTOP_APP_USE_PACKAGED)
target_compile_definitions(common_options
INTERFACE
Expand Down
6 changes: 6 additions & 0 deletions variables.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@ if (DESKTOP_APP_SPECIAL_TARGET STREQUAL "osx")
set(osx_special_target 1)
endif()

set(webrtc_not_supported 0)
if (osx_special_target OR (LINUX AND CMAKE_SIZEOF_VOID_P EQUAL 4))
set(webrtc_not_supported 1)
endif()

option(DESKTOP_APP_LOTTIE_USE_CACHE "Use caching in lottie animations." ON)
option(DESKTOP_APP_DISABLE_DBUS_INTEGRATION "Disable all code for D-Bus integration (Linux only)." OFF)
option(DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION "Disable all code for WebRTC integration." ${webrtc_not_supported})
option(DESKTOP_APP_USE_GLIBC_WRAPS "Use wraps for new GLIBC features." ${linux_special_target})
option(DESKTOP_APP_USE_PACKAGED "Find libraries using CMake instead of exact paths." ${no_special_target})
option(DESKTOP_APP_USE_PACKAGED_LAZY "Bundle recommended Qt plugins for self-contained packages. (Linux only)" OFF)
Expand Down

0 comments on commit b372364

Please sign in to comment.