Disable screencasting if there's no pipewire 0.3

Hopefully fixes the CI
This commit is contained in:
Aleix Pol 2020-07-23 23:33:30 +02:00
parent e7b8a5ad5e
commit 9438a2e1b1
4 changed files with 20 additions and 4 deletions

View file

@ -755,9 +755,6 @@ ecm_qt_declare_logging_category(kwin_XWAYLAND_SRCS
set(kwin_WAYLAND_SRCS
main_wayland.cpp
screencast/screencastmanager.cpp
screencast/pipewirecore.cpp
screencast/pipewirestream.cpp
tabletmodemanager.cpp
)
ecm_qt_declare_logging_category(kwin_WAYLAND_SRCS
@ -772,9 +769,19 @@ ecm_qt_declare_logging_category(kwin_WAYLAND_SRCS
)
add_executable(kwin_wayland ${kwin_WAYLAND_SRCS} ${kwin_XWAYLAND_SRCS})
if (PipeWire_FOUND)
target_sources(kwin_wayland
PRIVATE
screencast/screencastmanager.cpp
screencast/pipewirecore.cpp
screencast/pipewirestream.cpp)
target_link_libraries(kwin_wayland PkgConfig::PipeWire)
endif()
target_link_libraries(kwin_wayland
kwin
PkgConfig::PipeWire # required for PipewireStream
KF5::Crash
)
if (HAVE_LIBCAP)

View file

@ -42,3 +42,5 @@
#define XCB_ICCCM_WM_STATE_NORMAL 1
#define XCB_ICCCM_WM_STATE_ICONIC 3
#endif
#cmakedefine01 PipeWire_FOUND

View file

@ -26,7 +26,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "platform.h"
#include "effects.h"
#include "tabletmodemanager.h"
#ifdef PipeWire_FOUND
#include "screencast/screencastmanager.h"
#endif
#include "wayland_server.h"
#include "xwl/xwayland.h"
@ -165,7 +168,9 @@ void ApplicationWayland::performStartup()
VirtualKeyboard::create(this);
createBackend();
TabletModeManager::create(this);
#ifdef PipeWire_FOUND
new ScreencastManager(this);
#endif
}
void ApplicationWayland::createBackend()

View file

@ -458,7 +458,9 @@ bool WaylandServer::init(const QByteArray &socketName, InitializationFlags flags
m_keyState = m_display->createKeyStateInterface(m_display);
m_keyState->create();
#ifdef PipeWire_FOUND
m_screencast = m_display->createScreencastInterface(m_display);
#endif
return true;
}