2018-12-01 23:59:59 +01:00
|
|
|
cmake_minimum_required(VERSION 3.5)
|
2013-01-30 14:53:19 +01:00
|
|
|
|
2020-10-10 17:49:56 +02:00
|
|
|
set(KF5_VERSION "5.76.0") # handled by release scripts
|
2020-10-04 11:59:40 +02:00
|
|
|
set(KF5_DEP_VERSION "5.75.0") # handled by release scripts
|
2017-01-03 15:17:45 +01:00
|
|
|
project(Plasma VERSION ${KF5_VERSION})
|
2013-02-07 20:09:05 +01:00
|
|
|
|
2014-04-26 02:00:16 +02:00
|
|
|
# ECM setup
|
2015-05-14 05:02:45 +02:00
|
|
|
include(FeatureSummary)
|
2020-10-04 11:59:40 +02:00
|
|
|
find_package(ECM 5.75.0 NO_MODULE)
|
2019-12-15 23:55:27 +01:00
|
|
|
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules")
|
2015-05-14 05:02:45 +02:00
|
|
|
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
|
|
|
|
Keep desktoptheme SVG files uncompressed in repo, install svgz
Summary:
The SVG format being based on plain text, storing the SVG in the repository
not as .svgz, but .svg, helps both VCS tools (patching, showing diffs) as
well as allows some developers to edit the SVG directly in any text editor,
not only those which support automatic conversion from/to gzip format.
While most artists will continue (and which shall be okay) to use GUI
editors like inkscape, which might rewrite the complete structure on saving,
using uncompressed format in the repo still allows the occasional direct
edit of the text, .e.g. to change a colour, which then is also easily seen
in the commit diff.
To still keep the svgz format when deployed, a build step is introduced,
which uses gzip to create svgz files in the build dir. This conversion can
be controlled using the option GZIP_DESKTOPTHEME_SVG (default: ON).
Test Plan: Themes are still working (with & without cache removed).
Reviewers: #plasma, #vdg, ngraham
Reviewed By: #vdg, ngraham
Subscribers: bruns, GB_2, ndavis, ngraham, fvogt, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D20166
2019-04-01 13:55:56 +02:00
|
|
|
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
|
2015-05-14 05:02:45 +02:00
|
|
|
|
2013-10-31 09:30:24 +01:00
|
|
|
include(KDEInstallDirs)
|
|
|
|
include(KDECMakeSettings)
|
2019-10-15 17:56:33 +02:00
|
|
|
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
|
|
|
|
|
2019-10-15 20:23:31 +02:00
|
|
|
include(ECMGenerateExportHeader)
|
2019-10-15 17:56:33 +02:00
|
|
|
include(ECMGenerateHeaders)
|
2017-01-03 16:23:41 +01:00
|
|
|
include(CMakePackageConfigHelpers)
|
2014-04-26 02:00:16 +02:00
|
|
|
include(ECMSetupVersion)
|
2015-12-15 22:56:40 +01:00
|
|
|
include(ECMQtDeclareLoggingCategory)
|
2017-05-20 05:04:10 +02:00
|
|
|
include(ECMAddQch)
|
2015-12-29 10:47:17 +01:00
|
|
|
include(KDEPackageAppTemplates)
|
2017-04-10 15:02:50 +02:00
|
|
|
include(ECMGenerateQmlTypes)
|
2018-03-13 19:36:20 +01:00
|
|
|
include(ECMSetupQtPluginMacroNames)
|
2014-04-26 02:00:16 +02:00
|
|
|
|
2017-05-20 05:04:10 +02:00
|
|
|
option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF)
|
|
|
|
add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)")
|
|
|
|
|
2017-01-03 15:17:45 +01:00
|
|
|
ecm_setup_version(PROJECT
|
2014-04-26 02:00:16 +02:00
|
|
|
VARIABLE_PREFIX PLASMA
|
|
|
|
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/plasma_version.h"
|
|
|
|
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5PlasmaConfigVersion.cmake"
|
|
|
|
SOVERSION 5)
|
2013-01-30 14:53:19 +01:00
|
|
|
|
2019-03-20 07:12:03 +01:00
|
|
|
add_definitions(-DQT_NO_FOREACH)
|
2013-01-30 14:53:19 +01:00
|
|
|
################# now find all used packages #################
|
|
|
|
|
2019-12-21 12:38:37 +01:00
|
|
|
set (REQUIRED_QT_VERSION 5.12.0)
|
2013-01-30 14:53:19 +01:00
|
|
|
|
2018-01-24 13:25:40 +01:00
|
|
|
find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE COMPONENTS Quick Gui Sql Qml Svg QuickControls2)
|
2013-10-22 00:40:17 +02:00
|
|
|
|
2017-11-17 22:06:55 +01:00
|
|
|
find_package(KF5 ${KF5_DEP_VERSION} REQUIRED
|
|
|
|
COMPONENTS
|
|
|
|
Activities
|
|
|
|
Archive
|
|
|
|
Config
|
|
|
|
ConfigWidgets
|
|
|
|
CoreAddons
|
|
|
|
DBusAddons
|
|
|
|
Declarative
|
|
|
|
GlobalAccel
|
|
|
|
GuiAddons
|
|
|
|
I18n
|
|
|
|
IconThemes
|
|
|
|
KIO
|
|
|
|
Service
|
|
|
|
WindowSystem
|
|
|
|
XmlGui
|
|
|
|
Notifications
|
|
|
|
Package
|
disappearing scrollbars on mobile
Summary:
like other platforms, on mobile devices make scrollbars visible only when
dragging/flicking, behavior on desktop unchanged
it introduces a runtime dependency on kirigami, but was already kinda there
but broken as the Settings singleton was already used.
if this can't be done, i'll add something in plasmacore which reads as well the
QT_QUICK_CONTROLS_MOBILE environment variable
Test Plan: scrollbar disappearing with the variable set, normal behavior otherwise
Reviewers: #plasma, bshah, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D9287
2017-12-12 14:55:18 +01:00
|
|
|
Kirigami2
|
2017-11-17 22:06:55 +01:00
|
|
|
OPTIONAL_COMPONENTS
|
|
|
|
Wayland
|
|
|
|
DocTools
|
|
|
|
)
|
|
|
|
|
2016-10-11 12:09:10 +02:00
|
|
|
set_package_properties(KF5Wayland PROPERTIES DESCRIPTION "Integration with the Wayland compositor"
|
|
|
|
TYPE OPTIONAL
|
|
|
|
)
|
|
|
|
if(KF5Wayland_FOUND)
|
|
|
|
set(HAVE_KWAYLAND 1)
|
|
|
|
endif()
|
|
|
|
|
2014-04-04 18:13:48 +02:00
|
|
|
set_package_properties(KF5DocTools PROPERTIES DESCRIPTION "Tools to generate documentation"
|
2014-03-26 15:19:50 +01:00
|
|
|
TYPE OPTIONAL
|
|
|
|
)
|
|
|
|
|
2013-01-30 14:53:19 +01:00
|
|
|
#optional features
|
2015-03-12 10:52:09 +01:00
|
|
|
find_package(X11 MODULE)
|
|
|
|
set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
|
2019-01-19 16:35:21 +01:00
|
|
|
URL "https://www.x.org/"
|
2015-03-12 10:52:09 +01:00
|
|
|
TYPE OPTIONAL
|
|
|
|
)
|
|
|
|
find_package(XCB MODULE COMPONENTS XCB COMPOSITE DAMAGE SHAPE XFIXES RENDER)
|
|
|
|
set_package_properties(XCB PROPERTIES DESCRIPTION "X protocol C-language Binding"
|
2019-01-19 16:35:21 +01:00
|
|
|
URL "https://xcb.freedesktop.org/"
|
2015-03-12 10:52:09 +01:00
|
|
|
TYPE OPTIONAL
|
|
|
|
)
|
|
|
|
if(X11_FOUND AND XCB_XCB_FOUND)
|
|
|
|
set(HAVE_X11 1)
|
|
|
|
find_package(Qt5 REQUIRED NO_MODULE COMPONENTS X11Extras)
|
|
|
|
#X11_Xrender discovery is done by FindX11
|
|
|
|
#add_feature_info("X Rendering Extension (libXrender)" X11_Xrender_FOUND "Support for compositing, rendering operations, and alpha-blending. STRONGLY RECOMMENDED")
|
2013-02-08 00:56:43 +01:00
|
|
|
endif()
|
2013-01-30 14:53:19 +01:00
|
|
|
|
2013-08-18 10:01:44 +02:00
|
|
|
find_package(OpenGL)
|
|
|
|
set_package_properties(OpenGL PROPERTIES DESCRIPTION "The OpenGL libraries"
|
2019-01-19 16:35:21 +01:00
|
|
|
URL "https://www.opengl.org/"
|
2013-08-18 10:01:44 +02:00
|
|
|
TYPE OPTIONAL
|
|
|
|
)
|
2014-03-06 09:43:52 +01:00
|
|
|
|
|
|
|
find_package(EGL)
|
|
|
|
set_package_properties(EGL PROPERTIES
|
|
|
|
PURPOSE "Support for Window Thumbnail on EGL platform"
|
|
|
|
TYPE OPTIONAL
|
|
|
|
)
|
|
|
|
set(HAVE_EGL ${EGL_FOUND})
|
|
|
|
|
2014-02-24 09:41:31 +01:00
|
|
|
if(OPENGL_FOUND AND (${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GL"))
|
2013-10-22 00:40:17 +02:00
|
|
|
set(HAVE_GLX ${HAVE_X11})
|
2013-08-18 10:01:44 +02:00
|
|
|
else()
|
|
|
|
set(HAVE_GLX 0)
|
|
|
|
endif()
|
|
|
|
|
2013-01-30 14:53:19 +01:00
|
|
|
#########################################################################
|
|
|
|
|
2018-03-13 19:36:20 +01:00
|
|
|
ecm_setup_qtplugin_macro_names(
|
|
|
|
JSON_NONE
|
|
|
|
"K_EXPORT_PLASMA_SERVICE"
|
|
|
|
"K_EXPORT_PLASMA_APPLET"
|
|
|
|
"K_EXPORT_PLASMA_PACKAGE"
|
|
|
|
"K_EXPORT_PLASMA_APPLETSCRIPTENGINE"
|
|
|
|
"K_EXPORT_PLASMA_DATAENGINESCRIPTENGINE"
|
|
|
|
"K_EXPORT_PLASMA_DATAENGINE"
|
|
|
|
JSON_ARG2
|
|
|
|
"K_EXPORT_PLASMA_PACKAGE_WITH_JSON"
|
|
|
|
JSON_ARG3
|
|
|
|
"K_EXPORT_PLASMA_SERVICE_WITH_JSON"
|
|
|
|
"K_EXPORT_PLASMA_APPLET_WITH_JSON"
|
|
|
|
"K_EXPORT_PLASMA_APPLETSCRIPTENGINE_WITH_JSON"
|
|
|
|
"K_EXPORT_PLASMA_DATAENGINESCRIPTENGINE_WITH_JSON"
|
|
|
|
"K_EXPORT_PLASMA_CONTAINMENTACTIONS_WITH_JSON"
|
|
|
|
"K_EXPORT_PLASMA_DATAENGINE_WITH_JSON"
|
|
|
|
CONFIG_CODE_VARIABLE
|
|
|
|
PACKAGE_SETUP_AUTOMOC_VARIABLES
|
2018-02-22 01:59:12 +01:00
|
|
|
)
|
2019-09-17 21:31:26 +02:00
|
|
|
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00)
|
2020-10-11 11:32:11 +02:00
|
|
|
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054B00)
|
2014-02-08 12:30:02 +01:00
|
|
|
|
|
|
|
#add_definitions(-Wno-deprecated)
|
2013-01-30 14:53:19 +01:00
|
|
|
|
2013-12-11 13:53:09 +01:00
|
|
|
include(KF5PlasmaMacros.cmake)
|
2013-01-30 14:53:19 +01:00
|
|
|
|
2014-04-28 02:37:14 +02:00
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
|
|
|
|
option(BUILD_EXAMPLES "Build and install Plasma examples." OFF)
|
2014-07-23 20:22:15 +02:00
|
|
|
option(BUILD_COVERAGE "Build Plasma Frameworks with gcov support" OFF)
|
2014-04-28 02:37:14 +02:00
|
|
|
|
2014-07-23 20:22:15 +02:00
|
|
|
if(BUILD_COVERAGE)
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov")
|
|
|
|
endif()
|
2014-04-28 02:37:14 +02:00
|
|
|
|
2017-05-20 05:04:10 +02:00
|
|
|
# make plasma_version.h available
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
|
|
|
################# list the subdirectories #################
|
|
|
|
if (KF5DocTools_FOUND)
|
|
|
|
add_subdirectory(docs)
|
|
|
|
endif()
|
|
|
|
add_definitions(-DTRANSLATION_DOMAIN=\"libplasma5\")
|
|
|
|
if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
|
|
|
|
ki18n_install(po)
|
2017-09-03 19:15:18 +02:00
|
|
|
if (KF5DocTools_FOUND)
|
|
|
|
kdoctools_install(po)
|
|
|
|
endif()
|
2017-05-20 05:04:10 +02:00
|
|
|
endif()
|
|
|
|
add_subdirectory(src)
|
|
|
|
|
|
|
|
if (BUILD_EXAMPLES)
|
|
|
|
add_subdirectory(examples)
|
|
|
|
endif()
|
|
|
|
|
2018-07-10 18:56:48 +02:00
|
|
|
if (BUILD_TESTING)
|
|
|
|
add_subdirectory(autotests)
|
|
|
|
add_subdirectory(tests)
|
|
|
|
endif()
|
2017-05-20 05:04:10 +02:00
|
|
|
add_subdirectory(templates)
|
|
|
|
|
2013-05-03 01:14:19 +02:00
|
|
|
################ create PlasmaConfig.cmake and install it ###########################
|
|
|
|
|
|
|
|
# create a Config.cmake and a ConfigVersion.cmake file and install them
|
2014-02-08 12:30:02 +01:00
|
|
|
|
2015-01-10 18:47:31 +01:00
|
|
|
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Plasma")
|
2013-05-03 01:14:19 +02:00
|
|
|
|
2017-05-20 05:04:10 +02:00
|
|
|
if (BUILD_QCH)
|
|
|
|
ecm_install_qch_export(
|
|
|
|
TARGETS KF5Plasma_QCH
|
|
|
|
FILE KF5PlasmaQchTargets.cmake
|
|
|
|
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
|
|
|
|
COMPONENT Devel
|
|
|
|
)
|
|
|
|
set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF5PlasmaQchTargets.cmake\")")
|
|
|
|
endif()
|
|
|
|
|
2017-01-03 16:23:41 +01:00
|
|
|
configure_package_config_file(
|
2013-12-11 13:53:09 +01:00
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/KF5PlasmaConfig.cmake.in"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/KF5PlasmaConfig.cmake"
|
2013-05-03 01:14:19 +02:00
|
|
|
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
|
2014-04-26 13:14:03 +02:00
|
|
|
PATH_VARS KF5_INCLUDE_INSTALL_DIR CMAKE_INSTALL_PREFIX
|
2013-05-03 01:14:19 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
install(FILES
|
2013-12-11 13:53:09 +01:00
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/KF5PlasmaConfig.cmake"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/KF5PlasmaConfigVersion.cmake"
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/KF5PlasmaMacros.cmake"
|
2013-05-03 01:14:19 +02:00
|
|
|
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
|
|
|
|
COMPONENT Devel
|
|
|
|
)
|
2013-06-13 01:43:35 +02:00
|
|
|
|
2014-02-08 12:30:02 +01:00
|
|
|
install(EXPORT KF5PlasmaTargets
|
|
|
|
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
|
|
|
|
FILE KF5PlasmaTargets.cmake
|
|
|
|
NAMESPACE KF5::
|
|
|
|
COMPONENT Devel)
|
|
|
|
|
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/plasma_version.h
|
2015-01-10 18:47:31 +01:00
|
|
|
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel )
|
2014-02-08 12:30:02 +01:00
|
|
|
|
2014-04-26 02:00:16 +02:00
|
|
|
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|