Make VOIP and screenshare explicit options

This commit is contained in:
Nicolas Werner 2021-11-18 23:05:28 +01:00
parent 229d7be868
commit 26db90b29b
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
4 changed files with 18 additions and 43 deletions

View File

@ -30,6 +30,7 @@ build-gcc9:
-DCMAKE_INSTALL_PREFIX=.deps/usr -DCMAKE_INSTALL_PREFIX=.deps/usr
-DHUNTER_ROOT="../.hunter" -DHUNTER_ROOT="../.hunter"
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF -DUSE_BUNDLED_OPENSSL=ON -DUSE_BUNDLED_LMDB=OFF -DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF -DUSE_BUNDLED_OPENSSL=ON -DUSE_BUNDLED_LMDB=OFF
-DVOIP=OFF
-DCMAKE_BUILD_TYPE=Release -DHUNTER_CONFIGURATION_TYPES=Release -DCMAKE_BUILD_TYPE=Release -DHUNTER_CONFIGURATION_TYPES=Release
-DCI_BUILD=ON -DFETCHCONTENT_QUIET=OFF -DCI_BUILD=ON -DFETCHCONTENT_QUIET=OFF
- cmake --build build - cmake --build build

View File

@ -141,6 +141,7 @@
- Show borders around tables. - Show borders around tables.
- Improve wording of a few menu entries. (absorber) - Improve wording of a few menu entries. (absorber)
- Highlight navigated to message. - Highlight navigated to message.
- Switched to the fluent icon set.
### Bugfixes ### Bugfixes
@ -181,6 +182,7 @@
- Removed the AppImage - Removed the AppImage
- Removed dependency on boost - Removed dependency on boost
- Now depends on [coeurl](https://nheko.im/nheko-reborn/coeurl), which depends on libevent and libcurl. - Now depends on [coeurl](https://nheko.im/nheko-reborn/coeurl), which depends on libevent and libcurl.
- VOIP support now needs to be explicitly controlled using the VOIP and SCREENSHARE_X11 cmake options.
## [0.8.2] -- 2021-04-23 ## [0.8.2] -- 2021-04-23

View File

@ -55,6 +55,14 @@ option(USE_BUNDLED_COEURL "Use a bundled version of the Curl wrapper"
option(USE_BUNDLED_LIBEVENT "Use the bundled version of spdlog." ${HUNTER_ENABLED}) option(USE_BUNDLED_LIBEVENT "Use the bundled version of spdlog." ${HUNTER_ENABLED})
option(USE_BUNDLED_LIBCURL "Use the bundled version of spdlog." ${HUNTER_ENABLED}) option(USE_BUNDLED_LIBCURL "Use the bundled version of spdlog." ${HUNTER_ENABLED})
include(CMakeDependentOption)
set(VOIP_DEFAULT ON)
if (APPLE OR WIN32)
set(VOIP_DEFAULT OFF)
endif()
option(VOIP "Whether to enable voip support. Disable this, if you don't have gstreamer." ${VOIP_DEFAULT})
cmake_dependent_option(SCREENSHARE_X11 "Whether to enable screenshare support on X11." ON "VOIP" OFF)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
if(${CMAKE_VERSION} VERSION_LESS "3.14.0") if(${CMAKE_VERSION} VERSION_LESS "3.14.0")
@ -141,12 +149,6 @@ if (USE_BUNDLED_LIBEVENT)
find_package(Libevent CONFIG REQUIRED) find_package(Libevent CONFIG REQUIRED)
else() else()
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)
if (HUNTER_ENABLED)
message("pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'")
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_LIBDIR}")
set(ENV{PKG_CONFIG_LIBDIR} "${pkg_temp_backup}")
message("pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'")
endif()
pkg_check_modules(libevent_core REQUIRED IMPORTED_TARGET libevent_core) pkg_check_modules(libevent_core REQUIRED IMPORTED_TARGET libevent_core)
if (WIN32) if (WIN32)
pkg_check_modules(libevent_windows REQUIRED IMPORTED_TARGET libevent_windows) pkg_check_modules(libevent_windows REQUIRED IMPORTED_TARGET libevent_windows)
@ -162,12 +164,6 @@ if (USE_BUNDLED_LIBCURL)
find_package(CURL CONFIG REQUIRED) find_package(CURL CONFIG REQUIRED)
else() else()
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)
if (HUNTER_ENABLED)
message("pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'")
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_LIBDIR}")
set(ENV{PKG_CONFIG_LIBDIR} "${pkg_temp_backup}")
message("pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'")
endif()
pkg_check_modules(libcurl REQUIRED IMPORTED_TARGET libcurl) pkg_check_modules(libcurl REQUIRED IMPORTED_TARGET libcurl)
endif() endif()
@ -199,12 +195,6 @@ find_package(Qt5QuickCompiler)
find_package(Qt5DBus) find_package(Qt5DBus)
if (USE_BUNDLED_QTKEYCHAIN) if (USE_BUNDLED_QTKEYCHAIN)
if (HUNTER_ENABLED)
message("pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'")
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_LIBDIR}")
set(ENV{PKG_CONFIG_LIBDIR} "${pkg_temp_backup}")
message("pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'")
endif()
include(FetchContent) include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
qt5keychain qt5keychain
@ -509,25 +499,12 @@ else()
add_library(lmdbxx::lmdbxx ALIAS lmdbxx) add_library(lmdbxx::lmdbxx ALIAS lmdbxx)
endif() endif()
if (HUNTER_ENABLED) if (VOIP)
message("pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'") include(FindPkgConfig)
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_LIBDIR}") pkg_check_modules(GSTREAMER REQUIRED IMPORTED_TARGET gstreamer-sdp-1.0>=1.18 gstreamer-webrtc-1.0>=1.18)
set(ENV{PKG_CONFIG_LIBDIR} "${pkg_temp_backup}") if (SCREENSHARE_X11)
unset(ENV{PKG_CONFIG_LIBDIR}) pkg_check_modules(XCB REQUIRED IMPORTED_TARGET xcb xcb-ewmh)
message("pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'")
endif()
include(FindPkgConfig)
pkg_check_modules(GSTREAMER NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH IMPORTED_TARGET gstreamer-sdp-1.0>=1.18 gstreamer-webrtc-1.0>=1.18)
if (TARGET PkgConfig::GSTREAMER)
add_feature_info(voip ON "GStreamer found. Call support is enabled automatically.")
pkg_check_modules(XCB IMPORTED_TARGET xcb xcb-ewmh)
if (TARGET PkgConfig::XCB)
add_feature_info("Window selection when screen sharing (X11)" ON "XCB-EWMH found. Window selection is enabled when screen sharing (X11).")
else()
add_feature_info("Window selection when screen sharing (X11)" OFF "XCB-EWMH could not be found on your system. Screen sharing (X11) is limited to the entire screen only. To enable window selection, make sure xcb and xcb-ewmh can be found via pkgconfig.")
endif() endif()
else()
add_feature_info(voip OFF "GStreamer could not be found on your system. As a consequence call support has been disabled. If you don't want that, make sure gstreamer-sdp-1.0>=1.18 gstreamer-webrtc-1.0>=1.18 can be found via pkgconfig.")
endif() endif()
# single instance functionality # single instance functionality
@ -742,12 +719,6 @@ elseif(coeurl_DIR)
target_link_libraries(nheko PUBLIC coeurl::coeurl) target_link_libraries(nheko PUBLIC coeurl::coeurl)
else() else()
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)
if (HUNTER_ENABLED)
message("pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'")
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_LIBDIR}")
set(ENV{PKG_CONFIG_LIBDIR} "${pkg_temp_backup}")
message("pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'")
endif()
pkg_check_modules(coeurl REQUIRED IMPORTED_TARGET coeurl) pkg_check_modules(coeurl REQUIRED IMPORTED_TARGET coeurl)
target_link_libraries(nheko PUBLIC PkgConfig::coeurl) target_link_libraries(nheko PUBLIC PkgConfig::coeurl)
endif() endif()

View File

@ -164,13 +164,14 @@ choco install nheko-reborn
- [cmark](https://github.com/commonmark/cmark) 0.29 or greater. - [cmark](https://github.com/commonmark/cmark) 0.29 or greater.
- [libolm](https://gitlab.matrix.org/matrix-org/olm) - [libolm](https://gitlab.matrix.org/matrix-org/olm)
- [spdlog](https://github.com/gabime/spdlog) - [spdlog](https://github.com/gabime/spdlog)
- [GStreamer](https://gitlab.freedesktop.org/gstreamer) 1.18.0 or greater (optional, needed for VoIP support). - [GStreamer](https://gitlab.freedesktop.org/gstreamer) 1.18.0 or greater (optional, needed for VoIP support. Pass `-DVOIP=OFF` to disable.).
- Installing the gstreamer core library plus gst-plugins-base, gst-plugins-good & gst-plugins-bad - Installing the gstreamer core library plus gst-plugins-base, gst-plugins-good & gst-plugins-bad
is often sufficient. The qmlgl plugin though is often packaged separately. The actual plugin requirements is often sufficient. The qmlgl plugin though is often packaged separately. The actual plugin requirements
are as follows: are as follows:
- Voice call support: dtls, opus, rtpmanager, srtp, webrtc - Voice call support: dtls, opus, rtpmanager, srtp, webrtc
- Video call support (optional): compositor, opengl, qmlgl, rtp, vpx - Video call support (optional): compositor, opengl, qmlgl, rtp, vpx
- [libnice](https://gitlab.freedesktop.org/libnice/libnice) - [libnice](https://gitlab.freedesktop.org/libnice/libnice)
- XCB, XCB-EWMH: For screensharing support on X11. VOIP needs to be enabled. Can be disabled with `-DSCREENSHARE_X11=OFF`.
- [qtkeychain](https://github.com/frankosterfeld/qtkeychain) (You need at least version 0.12 for proper Gnome Keychain support) - [qtkeychain](https://github.com/frankosterfeld/qtkeychain) (You need at least version 0.12 for proper Gnome Keychain support)
- A compiler that supports C++ 17: - A compiler that supports C++ 17:
- Clang 6 (tested on Travis CI) - Clang 6 (tested on Travis CI)