1
0
mirror of https://invent.kde.org/network/krfb synced 2024-07-01 07:24:29 +00:00
krfb/CMakeLists.txt
Alexey Min b2cb3e8204 Implement XCB framebuffer plugin (port from x11)
Previously used x11 plugin does not compile with Qt5, because Qt5 does
not use Xlib, it uses xcb. Rewrite screen capture plugin from Xlib to
xcb.

I made xcb libs compile required dependency, but availability of X
shared memory extension is checked at runtime. It is used to effectively
get image pixels data, instead of transfering 8Mb over the wire. Xdamage
is used to limit image getting operations only within actually changed
rectangles of screen.

BUG: 377998

Tested on single-monitor system and dual-monitor, where primary monitor
does not start at (0,0) coordinate. Image transfer works fine.
Dual-monitor only has problems with receiving mouse cursor position and
clicks, but this should be fixed outside of framebuffer plugin.

Differential Revision: https://phabricator.kde.org/D5211
2017-06-15 23:21:58 +02:00

77 lines
1.7 KiB
CMake

cmake_minimum_required(VERSION 2.8.12)
project(krfb)
include(FeatureSummary)
find_package(Qt5 REQUIRED COMPONENTS Core DBus Widgets X11Extras)
find_package(ECM 1.7.0 NO_MODULE REQUIRED)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMInstallIcons)
include(ECMAddAppIcon)
find_package(KF5 REQUIRED COMPONENTS
I18n
Completion
Config
CoreAddons
Crash
DBusAddons
DNSSD
DocTools
Notifications
Wallet
WidgetsAddons
XmlGui
)
find_package(X11 REQUIRED)
find_package(XCB REQUIRED COMPONENTS
XCB
RENDER
SHAPE
XFIXES
DAMAGE
SHM
IMAGE
)
if(WIN32)
set(CMAKE_REQUIRED_LIBRARIES ${KDEWIN32_LIBRARIES})
set(CMAKE_REQUIRED_INCLUDES ${KDEWIN32_INCLUDES})
endif(WIN32)
add_definitions(${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS})
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} )
set(CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
${CMAKE_MODULE_PATH}
)
find_package(LibVNCServer REQUIRED)
include_directories ("${CMAKE_CURRENT_BINARY_DIR}/krfb"
"${CMAKE_CURRENT_SOURCE_DIR}/krfb"
"${CMAKE_CURRENT_SOURCE_DIR}/krfb/ui"
)
if(Q_WS_X11)
if(NOT X11_XTest_FOUND)
message(FATAL_ERROR "krfb requires the libXtst (http://xorg.freedesktop.org) to be built")
endif(NOT X11_XTest_FOUND)
endif(Q_WS_X11)
add_subdirectory(krfb)
add_subdirectory(framebuffers)
add_subdirectory(doc)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)