Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWayland Integration
Commits
2ac5b52c
Commit
2ac5b52c
authored
Apr 05, 2022
by
Laurent Montel
Browse files
Adapt build system for building against qt6
parent
b05afab7
Pipeline
#159516
passed with stage
in 1 minute and 4 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
2ac5b52c
...
...
@@ -7,7 +7,7 @@ set(PROJECT_VERSION_MAJOR 5)
cmake_minimum_required
(
VERSION 3.16
)
set
(
QT_MIN_VERSION
"5.15.0"
)
set
(
KF5_MIN_VERSION
"5.
86
"
)
set
(
KF5_MIN_VERSION
"5.
90
"
)
set
(
KDE_COMPILERSETTINGS_LEVEL
"5.82"
)
set
(
CMAKE_CXX_STANDARD 17
)
...
...
@@ -15,19 +15,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package
(
ECM
${
KF5_MIN_VERSION
}
REQUIRED NO_MODULE
)
include
(
FeatureSummary
)
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
${
ECM_MODULE_PATH
}
)
find_package
(
Qt5
${
QT_MIN_VERSION
}
CONFIG REQUIRED COMPONENTS
Core
Widgets
WaylandClient
XkbCommonSupport
# Needed by Qt5::WaylandClientPrivate
)
include
(
FeatureSummary
)
include
(
KDEInstallDirs
)
include
(
KDECMakeSettings
)
include
(
KDECompilerSettings NO_POLICY_SCOPE
)
...
...
@@ -35,6 +26,12 @@ include(ECMQtDeclareLoggingCategory)
include
(
KDEClangFormat
)
include
(
KDEGitCommitHooks
)
find_package
(
Qt
${
QT_MAJOR_VERSION
}
${
QT_MIN_VERSION
}
CONFIG REQUIRED COMPONENTS
Core
Widgets
WaylandClient
)
# required frameworks
find_package
(
KF5
${
KF5_MIN_VERSION
}
REQUIRED COMPONENTS
IdleTime
...
...
@@ -43,7 +40,11 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Wayland
)
find_package
(
QtWaylandScanner REQUIRED
)
if
(
QT_MAJOR_VERSION EQUAL
"5"
)
find_package
(
QtWaylandScanner REQUIRED
)
find_package
(
Qt5XkbCommonSupport REQUIRED
)
# Needed by Qt5::WaylandClientPrivate
endif
()
find_package
(
WaylandProtocols 1.21 REQUIRED
)
find_package
(
Wayland 1.15 COMPONENTS Client
)
find_package
(
PkgConfig REQUIRED
)
...
...
autotests/CMakeLists.txt
View file @
2ac5b52c
include
(
ECMMarkAsTest
)
find_package
(
Qt
5
${
REQUIRED_QT_VERSION
}
CONFIG REQUIRED Test
)
find_package
(
Qt
${
QT_MAJOR_VERSION
}
${
REQUIRED_QT_VERSION
}
CONFIG REQUIRED Test
)
add_subdirectory
(
idletime
)
src/idletime/CMakeLists.txt
View file @
2ac5b52c
...
...
@@ -13,5 +13,5 @@ install(
TARGETS
KF5IdleTimeKWaylandPlugin
DESTINATION
${
KDE_INSTALL_PLUGINDIR
}
/kf
5
/org.kde.kidletime.platforms/
${
KDE_INSTALL_PLUGINDIR
}
/kf
${
QT_MAJOR_VERSION
}
/org.kde.kidletime.platforms/
)
src/kmodifierkeyinfoprovider/CMakeLists.txt
View file @
2ac5b52c
add_library
(
kmodifierkey_wayland MODULE kmodifierkeyinfoprovider_wayland.cpp kmodifierkeyinfoprovider_wayland.h
)
target_link_libraries
(
kmodifierkey_wayland PRIVATE KF5::WaylandClient KF5::GuiAddons
)
install
(
TARGETS kmodifierkey_wayland DESTINATION
${
KDE_INSTALL_PLUGINDIR
}
/kf
5
/kguiaddons/kmodifierkey/
)
install
(
TARGETS kmodifierkey_wayland DESTINATION
${
KDE_INSTALL_PLUGINDIR
}
/kf
${
QT_MAJOR_VERSION
}
/kguiaddons/kmodifierkey/
)
src/windowsystem/CMakeLists.txt
View file @
2ac5b52c
add_library
(
KF5WindowSystemKWaylandPlugin MODULE
)
set
(
wayland_plugin_SRCS
plugin.cpp
waylandintegration.cpp
...
...
@@ -14,34 +15,46 @@ set(wayland_plugin_SRCS
windowsystem.h
waylandxdgactivationv1_p.h
)
if
(
QT_MAJOR_VERSION EQUAL
"5"
)
ecm_add_qtwayland_client_protocol
(
wayland_plugin_SRCS
PROTOCOL
${
WaylandProtocols_DATADIR
}
/staging/xdg-activation/xdg-activation-v1.xml
BASENAME xdg-activation-v1
)
else
()
qt6_generate_wayland_protocol_client_sources
(
KF5WindowSystemKWaylandPlugin FILES
${
WaylandProtocols_DATADIR
}
/staging/xdg-activation/xdg-activation-v1.xml
)
ecm_add_qtwayland_client_protocol
(
wayland_plugin_SRCS
PROTOCOL
${
WaylandProtocols_DATADIR
}
/staging/xdg-activation/xdg-activation-v1.xml
BASENAME xdg-activation-v1
)
endif
()
ecm_qt_declare_logging_category
(
wayland_plugin_SRCS HEADER logging.h IDENTIFIER KWAYLAND_KWS
CATEGORY_NAME org.kde.kf5.kwindowsystem.kwayland DEFAULT_SEVERITY Warning
DESCRIPTION
"wayland integration (windowsystem)"
EXPORT KWAYLAND
)
target_sources
(
KF5WindowSystemKWaylandPlugin PRIVATE
${
wayland_plugin_SRCS
}
)
pkg_check_modules
(
XKBCommon REQUIRED IMPORTED_TARGET xkbcommon
)
add_library
(
KF5WindowSystemKWaylandPlugin MODULE
${
wayland_plugin_SRCS
}
)
target_link_libraries
(
KF5WindowSystemKWaylandPlugin
KF5::WindowSystem
KF5::WaylandClient
Qt::Widgets
Wayland::Client
Qt::WaylandClient
Qt::WaylandClientPrivate
Qt::XkbCommonSupportPrivate
PkgConfig::XKBCommon
)
if
(
QT_MAJOR_VERSION EQUAL
"5"
)
target_link_libraries
(
KF5WindowSystemKWaylandPlugin
Qt::WaylandClientPrivate
Qt::XkbCommonSupportPrivate
)
endif
()
install
(
TARGETS
KF5WindowSystemKWaylandPlugin
DESTINATION
${
KDE_INSTALL_PLUGINDIR
}
/kf
5
/kwindowsystem/
${
KDE_INSTALL_PLUGINDIR
}
/kf
${
QT_MAJOR_VERSION
}
/kwindowsystem/
)
ecm_qt_install_logging_categories
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment