@ -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_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" )
if ( ${ CMAKE_VERSION } VERSION_LESS "3.14.0" )
@ -141,12 +149,6 @@ if (USE_BUNDLED_LIBEVENT)
find_package ( Libevent CONFIG REQUIRED )
else ( )
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 )
if ( WIN32 )
pkg_check_modules ( libevent_windows REQUIRED IMPORTED_TARGET libevent_windows )
@ -162,12 +164,6 @@ if (USE_BUNDLED_LIBCURL)
find_package ( CURL CONFIG REQUIRED )
else ( )
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 )
endif ( )
@ -199,12 +195,6 @@ find_package(Qt5QuickCompiler)
find_package ( Qt5DBus )
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 )
FetchContent_Declare (
q t 5 k e y c h a i n
@ -509,25 +499,12 @@ else()
add_library ( lmdbxx::lmdbxx ALIAS lmdbxx )
endif ( )
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}" )
unset ( ENV{PKG_CONFIG_LIBDIR} )
message ( "pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'" )
endif ( )
if ( VOIP )
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." )
pkg_check_modules ( GSTREAMER REQUIRED IMPORTED_TARGET gstreamer-sdp-1.0>=1.18 gstreamer-webrtc-1.0>=1.18 )
if ( SCREENSHARE_X11 )
pkg_check_modules ( XCB REQUIRED IMPORTED_TARGET xcb xcb-ewmh )
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 ( )
# s i n g l e i n s t a n c e f u n c t i o n a l i t y
@ -742,12 +719,6 @@ elseif(coeurl_DIR)
target_link_libraries ( nheko PUBLIC coeurl::coeurl )
else ( )
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 )
target_link_libraries ( nheko PUBLIC PkgConfig::coeurl )
endif ( )