Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

...
 
Commits (11)
......@@ -11,7 +11,7 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
# Preliminary setup
#
set(VERSION "5.72.0") # handled by release scripts
set(VERSION "5.73.0") # handled by release scripts
if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
......
......@@ -84,7 +84,7 @@ License
All code is licensed under the `BSD 3-Clause license`_.
.. _BSD 3-Clause license: http://opensource.org/licenses/BSD-3-Clause
.. _BSD 3-Clause license: https://opensource.org/licenses/BSD-3-Clause
Links
......
......@@ -25,7 +25,7 @@ SET(LIBLZMA_INCLUDE_DIRS ${LIBLZMA_INCLUDE_DIR})
# We're using new code known now as XZ, even library still been called LZMA
# it can be found in http://tukaani.org/xz/
# it can be found in https://tukaani.org/xz/
# Avoid using old codebase
IF (LIBLZMA_LIBRARIES)
INCLUDE(CheckLibraryExists)
......
......@@ -4,7 +4,7 @@
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
# PyQt4 website: http://www.riverbankcomputing.co.uk/pyqt/index.php
# PyQt4 website: https://riverbankcomputing.com/software/pyqt
#
# Find the installed version of PyQt4. FindPyQt4 should only be called after
# Python has been found.
......
......@@ -346,7 +346,7 @@
# QT_QT_LIBRARY Qt-Library is now split
# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
# See Copyright.txt or https://cmake.org/licensing for details.
# Use FIND_PACKAGE( Qt4 COMPONENTS ... ) to enable modules
IF( Qt4_FIND_COMPONENTS )
......
# Find SIP
# ~~~~~~~~
#
# SIP website: http://www.riverbankcomputing.co.uk/sip/index.php
# SIP website: https://riverbankcomputing.com/software/sip
#
# Find the installed version of SIP. FindSIP should be called after Python
# has been found.
......
......@@ -8,11 +8,11 @@ Changes to any files should follow the
cmake commit policy
at http://techbase.kde.org/Policies/CMake_Commit_Policy
at https://community.kde.org/Policies/CMake_Commit_Policy
and the cmake coding style
at http://techbase.kde.org/Policies/CMake_Coding_Style
at https://community.kde.org/Policies/CMake_Coding_Style
Alex <neundorf@kde.org>
......
......@@ -4,7 +4,7 @@
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
# SIP website: http://www.riverbankcomputing.co.uk/sip/index.php
# SIP website: https://riverbankcomputing.com/software/sip
#
# This file defines the following macros:
#
......
......@@ -11,7 +11,7 @@ find_package(Sphinx 1.2 MODULE)
set_package_properties(
Sphinx
PROPERTIES
URL "http://sphinx-doc.org/"
URL "https://www.sphinx-doc.org/"
DESCRIPTION "Tool to generate documentation."
TYPE OPTIONAL
PURPOSE "Required to build documentation for Extra CMake Modules."
......
.. ecm-module:: ../../modules/ECMConfiguredInstall.cmake
.. ecm-module:: ../../modules/ECMGenerateDBusServiceFile.cmake
......@@ -16,7 +16,7 @@
# ``Taglib_VERSION``
# The version of taglib that was found
#
# If ``Taglib_FOUND is TRUE, it will also define the following imported
# If ``Taglib_FOUND`` is TRUE, it will also define the following imported
# target:
#
# ``Taglib::Taglib``
......
......@@ -32,6 +32,9 @@
# ``Wayland_DEFINITIONS``
# This should be passed to target_compile_options() if the targets are not
# used for linking
# ``Wayland_DATADIR``
# The core wayland protocols data directory
# Since 5.73.0
#
# For each searched-for components, ``Wayland_<component>_FOUND`` will be set to
# TRUE if the corresponding Wayland library was found, and FALSE otherwise. If
......@@ -115,6 +118,8 @@ find_package_handle_standard_args(Wayland
HANDLE_COMPONENTS
)
pkg_get_variable(Wayland_DATADIR wayland-server pkgdatadir)
include(FeatureSummary)
set_package_properties(Wayland PROPERTIES
URL "https://wayland.freedesktop.org/"
......
......@@ -107,7 +107,7 @@ function(kde_package_app_templates)
add_custom_target(${_baseName} ALL DEPENDS ${_template})
add_custom_command(OUTPUT ${_template}
add_custom_command(OUTPUT ${_template} ALL
COMMAND ${CMAKE_COMMAND} -E tar "cvfj" ${_template} .
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_templateName}
)
......
#.rst:
# ECMConfiguredInstall
# --------------------
#
# Takes a list of files, runs configure_file on each and installs the resultant configured files in the given location.
#
# Any suffix of ".in" in the passed file names wil be stripped from the file name at the installed location.
#
# ::
#
# ecm_install_configured_files(
# INPUT <file> [<file2> [...]]
# DESTINATION <INSTALL_DIRECTORY>
# [COPYONLY]
# [ESCAPE_QUOTES]
# [@ONLY]
# [COMPONENT <component>])
#
# Example usage:
#
# .. code-block:: cmake
#
# ecm_install_configured_files(INPUT foo.txt.in DESTINATION ${KDE_INSTALL_DATADIR} @ONLY)
#
# This wil install the file as foo.txt with any cmake variable replacements made into the data directory.
#
# Since 5.73.0.
#=============================================================================
# SPDX-FileCopyrightText: 2020 David Edmundson <davidedmundson@kde.org>
#
# SPDX-License-Identifier: BSD-3-Clause
#=============================================================================
function(ecm_install_configured_files)
set(options COPYONLY ESCAPE_QUOTES @ONLY)
set(oneValueArgs DESTINATION COMPONENT)
set(multiValueArgs INPUT)
cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN})
if(ARGS_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unknown arguments given to ecm_install_configured_file(): \"${ARGS_UNPARSED_ARGUMENTS}\"")
endif()
if (NOT ARGS_DESTINATION)
message(FATAL_ERROR "missing DESTINATION argument to ECMConfiguredInstall")
endif()
foreach(_input ${ARGS_INPUT})
# convert absolute paths
get_filename_component(_name ${_input} NAME)
string(REGEX REPLACE "\\.in$" "" _name ${_name})
set(_out_file ${CMAKE_CURRENT_BINARY_DIR}/${_name})
set(_configure_args)
if (ARGS_COPY_ONLY)
list(APPEND _configure_args COPY_ONLY)
endif()
if (ARGS_ESCAPE_QUOTES)
list(APPEND _configure_args ESCAPE_QUOTES)
endif()
if (ARGS_@ONLY)
list(APPEND _configure_args @ONLY)
endif()
configure_file(${_input} ${_out_file} ${_configure_args})
if (DEFINED ARGS_COMPONENT)
set(_component COMPONENT ${ARGS_COMPONENT})
else()
set(_component)
endif()
install(FILES ${_out_file} DESTINATION ${ARGS_DESTINATION} ${_component})
endforeach()
endfunction()
#.rst:
# ECMGenerateDBusServiceFile
# ---------------------------
#
# This module provides the ``ecm_generate_dbus_service_file`` function for
# generating and installing a D-Bus service file.
#
# ::
#
# ecm_generate_dbus_service_file(
# NAME <service name>
# EXECUTABLE <executable>
# [SYSTEMD_SERVICE <systemd service>]
# DESTINATION <install_path>
# )
#
# A D-Bus service file ``<service name>.service`` will be generated and installed
# in the relevant D-Bus config location.
#
# ``<executable>`` must be an absolute path to the installed service executable. When using it with
# ``KDEInstallDirs`` it needs to be the ``_FULL_`` variant of the path variable.
#
# Note: On Windows, the macro will only use the file name part of ``<executable>`` since D-Bus
# service executables are to be installed in the same directory as the D-Bus daemon.
#
# Optionally, a ``<systemd service>`` can be specified to launch the corresponding
# systemd service instead of the ``<executable>`` if the D-Bus daemon is started by systemd.
#
# Example usage:
#
# .. code-block:: cmake
#
# ecm_generate_dbus_service_file(
# NAME org.kde.kded5
# EXECUTABLE ${KDE_INSTALL_FULL_BINDIR}/kded5
# DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}
# )
#
# .. code-block:: cmake
#
# ecm_generate_dbus_service_file(
# NAME org.kde.kded5
# EXECUTABLE ${KDE_INSTALL_FULL_BINDIR}/kded5
# SYSTEMD_SERVICE plasma-kded.service
# DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}
# )
#
# Since 5.73.0.
#=============================================================================
# SPDX-FileCopyrightText: 2020 Kai Uwe Broulik <kde@broulik.de>
#
# SPDX-License-Identifier: BSD-3-Clause
include(CMakeParseArguments)
function(ecm_generate_dbus_service_file)
set(options)
set(oneValueArgs EXECUTABLE NAME SYSTEMD_SERVICE DESTINATION)
set(multiValueArgs)
cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(ARG_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unexpected arguments to ecm_generate_dbus_service_file: ${ARG_UNPARSED_ARGUMENTS}")
endif()
if(NOT ARG_NAME)
message(FATAL_ERROR "Missing NAME argument for ecm_generate_dbus_service_file")
endif()
if(NOT ARG_EXECUTABLE)
message(FATAL_ERROR "Missing EXECUTABLE argument for ecm_generate_dbus_service_file")
endif()
if(NOT ARG_DESTINATION)
message(FATAL_ERROR "Missing DESTINATION argument for ecm_generate_dbus_service_file")
endif()
if(WIN32)
get_filename_component(_exec "${ARG_EXECUTABLE}" NAME)
else()
if (NOT IS_ABSOLUTE ${ARG_EXECUTABLE})
message(FATAL_ERROR "EXECUTABLE must be an absolute path in ecm_generate_dbus_service_file")
else()
set(_exec ${ARG_EXECUTABLE})
endif()
endif()
set(_service_file ${CMAKE_CURRENT_BINARY_DIR}/${ARG_NAME}.service)
file(WRITE ${_service_file}
"[D-BUS Service]
Name=${ARG_NAME}
Exec=${_exec}
")
if (ARG_SYSTEMD_SERVICE)
file(APPEND ${_service_file} "SystemdService=${ARG_SYSTEMD_SERVICE}\n")
endif()
install(FILES ${_service_file} DESTINATION ${ARG_DESTINATION})
endfunction()
......@@ -51,11 +51,12 @@
# <theme><size>-<group>-<name>.<ext>
#
# where ``<theme>`` is one of
# * ``hi`` for hicolor
# * ``lo`` for locolor
# * ``cr`` for the Crystal icon theme
# * ``ox`` for the Oxygen icon theme
# * ``br`` for the Breeze icon theme
#
# * ``hi`` for hicolor
# * ``lo`` for locolor
# * ``cr`` for the Crystal icon theme
# * ``ox`` for the Oxygen icon theme
# * ``br`` for the Breeze icon theme
#
# With this syntax, the file ``hi22-actions-menu_new.png`` would be installed
# into ``<icon_install_dir>/hicolor/22x22/actions/menu_new.png``
......
......@@ -86,7 +86,7 @@
# and that way will ensure that in the 3rd-party plugin's buildsystem
# automoc is instructed as well as needed:
#
# .. code-block:: cmake
# ::
#
# @PACKAGE_SETUP_AUTOMOC_VARIABLES@
#
......
......@@ -201,3 +201,21 @@ set_package_properties(
if (TARGET Qt5::Quick)
add_test_macro(ECMQMLModules dummy)
endif()
set(ECMConfiguredInstallTest_EXTRA_OPTIONS
--build-target install
--build-options
"-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/ECMConfiguredInstallTest/InstallDirectory"
)
add_test_macro(ECMConfiguredInstallTest
${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/ECMConfiguredInstallTest/check_tree.cmake"
)
set(ECMGenerateDBusServiceFileTest_EXTRA_OPTIONS
--build-target install
--build-options
"-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/ECMGenerateDBusServiceFileTest/InstallDirectory"
)
add_test_macro(ECMGenerateDBusServiceFileTest
${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/ECMGenerateDBusServiceFileTest/check_tree.cmake"
)
cmake_minimum_required(VERSION 3.5)
project(ECMConfiguredInstallTest)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../modules)
# make sure the test install dir is clean
file(REMOVE_RECURSE "${CMAKE_INSTALL_PREFIX}")
include(ECMConfiguredInstall)
# run test
set(FOO myFoo)
set(BAR myBar)
ecm_install_configured_files(INPUT configured.txt DESTINATION ${CMAKE_INSTALL_PREFIX}/test)
ecm_install_configured_files(INPUT configured_atOnly.txt.in DESTINATION ${CMAKE_INSTALL_PREFIX}/test @ONLY ESCAPE_QUOTES)
ecm_install_configured_files(INPUT multi1.txt.in ${CMAKE_CURRENT_SOURCE_DIR}/multi2.txt.in DESTINATION ${CMAKE_INSTALL_PREFIX}/test)
# this will be run by CTest
configure_file(check_tree.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/check_tree.cmake" @ONLY)
set(EXPECTED "@CMAKE_CURRENT_SOURCE_DIR@/expected")
set(ACTUAL "@CMAKE_INSTALL_PREFIX@")
# Compares files in two directories, emits a fatal error if the top level files are different
# Takes a directory of expected files, and a directory of output files
function(compare_dirs expected output )
file(GLOB files "${expected}/*")
foreach(file ${files})
get_filename_component(name ${file} NAME)
execute_process(COMMAND ${CMAKE_COMMAND} -E compare_files ${file} "${output}/${name}"
RESULT_VARIABLE test_result
)
If (NOT test_result EQUAL 0)
message(FATAL_ERROR "Test failed: ${file} doesn't match ${output}/${name}!")
endif()
endforeach()
endfunction()
compare_dirs(${EXPECTED} ${ACTUAL}/test )
cmake_minimum_required(VERSION 3.5)
project(ECMGenerateDBusServiceFileTest)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../modules)
# make sure the test install dir is clean
file(REMOVE_RECURSE "${CMAKE_INSTALL_PREFIX}")
include(ECMGenerateDBusServiceFile)
# run test
ecm_generate_dbus_service_file(
NAME org.kde.kded5
EXECUTABLE /usr/bin/kded5
DESTINATION ${CMAKE_INSTALL_PREFIX}/test
)
ecm_generate_dbus_service_file(
NAME org.kde.kded5.withSystemD
EXECUTABLE /usr/bin/kded5
SYSTEMD_SERVICE plasma-kded.service
DESTINATION ${CMAKE_INSTALL_PREFIX}/test
)
# this will be run by CTest
configure_file(check_tree.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/check_tree.cmake" @ONLY)
set(EXPECTED "@CMAKE_CURRENT_SOURCE_DIR@/expected")
set(ACTUAL "@CMAKE_INSTALL_PREFIX@")
# Compares files in two directories, emits a fatal error if the top level files are different
# Takes a directory of expected files, and a directory of output files
function(compare_dirs expected output )
file(GLOB files "${expected}/*")
foreach(file ${files})
get_filename_component(name ${file} NAME)
execute_process(COMMAND ${CMAKE_COMMAND} -E compare_files ${file} "${output}/${name}"
RESULT_VARIABLE test_result
)
If (NOT test_result EQUAL 0)
message(FATAL_ERROR "Test failed: ${file} doesn't match ${output}/${name}!")
endif()
endforeach()
endfunction()
compare_dirs(${EXPECTED} ${ACTUAL}/test )
[D-BUS Service]
Name=org.kde.kded5
Exec=/usr/bin/kded5
[D-BUS Service]
Name=org.kde.kded5.withSystemD
Exec=/usr/bin/kded5
SystemdService=plasma-kded.service