diff -Nru extra-cmake-modules-5.92.0/CMakeLists.txt extra-cmake-modules-5.98.0/CMakeLists.txt --- extra-cmake-modules-5.92.0/CMakeLists.txt 2022-02-27 20:48:24.000000000 +0000 +++ extra-cmake-modules-5.98.0/CMakeLists.txt 2022-08-27 09:14:28.000000000 +0000 @@ -11,7 +11,7 @@ # Preliminary setup # -set(VERSION "5.92.0") # handled by release scripts +set(VERSION "5.98.0") # handled by release scripts if (POLICY CMP0048) cmake_policy(SET CMP0048 NEW) diff -Nru extra-cmake-modules-5.92.0/debian/changelog extra-cmake-modules-5.98.0/debian/changelog --- extra-cmake-modules-5.92.0/debian/changelog 2022-03-16 16:25:05.000000000 +0000 +++ extra-cmake-modules-5.98.0/debian/changelog 2022-09-05 13:33:30.000000000 +0000 @@ -1,3 +1,39 @@ +extra-cmake-modules (5.98.0-0ubuntu1~ubuntu22.04~ppa1) jammy; urgency=high + + * New upstream release (5.98.0) + + -- Rik Mills Mon, 05 Sep 2022 14:33:30 +0100 + +extra-cmake-modules (5.97.0-0ubuntu1) kinetic; urgency=medium + + * New upstream release (5.97.0) + + -- Rik Mills Sat, 13 Aug 2022 14:02:07 +0100 + +extra-cmake-modules (5.96.0-0ubuntu1) kinetic; urgency=medium + + * New upstream release (5.96.0) + + -- Rik Mills Sat, 09 Jul 2022 16:28:11 +0100 + +extra-cmake-modules (5.95.0-0ubuntu1) kinetic; urgency=medium + + * New upstream release (5.95.0) + + -- Rik Mills Sat, 11 Jun 2022 09:53:24 +0100 + +extra-cmake-modules (5.94.0-0ubuntu1) kinetic; urgency=medium + + * New upstream release (5.94.0) + + -- Rik Mills Thu, 12 May 2022 16:17:09 +0100 + +extra-cmake-modules (5.93.0-0ubuntu1) kinetic; urgency=medium + + * New upstream release (5.93.0) + + -- Rik Mills Fri, 29 Apr 2022 08:20:42 +0100 + extra-cmake-modules (5.92.0-0ubuntu1) jammy; urgency=medium * New upstream release (5.92.0) diff -Nru extra-cmake-modules-5.92.0/docs/kde-module/KDEMetaInfoPlatformCheck.rst extra-cmake-modules-5.98.0/docs/kde-module/KDEMetaInfoPlatformCheck.rst --- extra-cmake-modules-5.92.0/docs/kde-module/KDEMetaInfoPlatformCheck.rst 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.98.0/docs/kde-module/KDEMetaInfoPlatformCheck.rst 2022-08-27 09:14:28.000000000 +0000 @@ -0,0 +1 @@ +.. ecm-module:: ../../kde-modules/KDEMetaInfoPlatformCheck.cmake diff -Nru extra-cmake-modules-5.92.0/docs/module/ECMQueryQt.rst extra-cmake-modules-5.98.0/docs/module/ECMQueryQt.rst --- extra-cmake-modules-5.92.0/docs/module/ECMQueryQt.rst 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.98.0/docs/module/ECMQueryQt.rst 2022-08-27 09:14:28.000000000 +0000 @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMQueryQt.cmake diff -Nru extra-cmake-modules-5.92.0/find-modules/FindLibExiv2.cmake extra-cmake-modules-5.98.0/find-modules/FindLibExiv2.cmake --- extra-cmake-modules-5.92.0/find-modules/FindLibExiv2.cmake 2022-02-27 20:48:24.000000000 +0000 +++ extra-cmake-modules-5.98.0/find-modules/FindLibExiv2.cmake 2022-08-27 09:14:28.000000000 +0000 @@ -86,6 +86,13 @@ IMPORTED_LOCATION "${LibExiv2_LIBRARIES}" INTERFACE_INCLUDE_DIRECTORIES "${LibExiv2_INCLUDE_DIRS}" ) + if (LibExiv2_VERSION VERSION_LESS 0.28.0) + # exiv2 0.27 or older still uses std::auto_ptr, which is no longer available + # by default when using newer C++ versions + set_target_properties(LibExiv2::LibExiv2 PROPERTIES + INTERFACE_COMPILE_DEFINITIONS "_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR=1" + ) + endif() endif() include(FeatureSummary) diff -Nru extra-cmake-modules-5.92.0/find-modules/FindQtWaylandScanner.cmake extra-cmake-modules-5.98.0/find-modules/FindQtWaylandScanner.cmake --- extra-cmake-modules-5.92.0/find-modules/FindQtWaylandScanner.cmake 2022-02-27 20:48:24.000000000 +0000 +++ extra-cmake-modules-5.98.0/find-modules/FindQtWaylandScanner.cmake 2022-08-27 09:14:28.000000000 +0000 @@ -34,6 +34,11 @@ :: + ecm_add_qtwayland_client_protocol( + PROTOCOL + BASENAME + [PREFIX ]) + ecm_add_qtwayland_client_protocol( PROTOCOL BASENAME @@ -41,13 +46,18 @@ Generate C++ wrapper to Wayland client protocol files from ```` XML definition for the ```` interface and append those files -to ````. Pass the ```` argument if the interface +to ```` or ````. Pass the ```` argument if the interface names don't start with ``qt_`` or ``wl_``. WaylandScanner is required and will be searched for. :: + ecm_add_qtwayland_server_protocol( + PROTOCOL + BASENAME + [PREFIX ]) + ecm_add_qtwayland_server_protocol( PROTOCOL BASENAME @@ -55,7 +65,7 @@ Generate C++ wrapper to Wayland server protocol files from ```` XML definition for the ```` interface and append those files -to ````. Pass the ```` argument if the interface +to ```` or ````. Pass the ```` argument if the interface names don't start with ``qt_`` or ``wl_``. WaylandScanner is required and will be searched for. @@ -64,11 +74,11 @@ #]=======================================================================] include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake) -include("${ECM_MODULE_DIR}/ECMQueryQmake.cmake") +include("${ECM_MODULE_DIR}/ECMQueryQt.cmake") ecm_find_package_version_check(QtWaylandScanner) -query_qmake(qt_binaries_dir QT_HOST_BINS) +ecm_query_qt(qt_binaries_dir QT_HOST_BINS) # Find qtwaylandscanner find_program(QtWaylandScanner_EXECUTABLE NAMES qtwaylandscanner HINTS ${qt_binaries_dir}) @@ -99,7 +109,7 @@ include(CMakeParseArguments) -function(ecm_add_qtwayland_client_protocol out_var) +function(ecm_add_qtwayland_client_protocol target_or_sources_var) # Parse arguments set(oneValueArgs PROTOCOL BASENAME PREFIX) cmake_parse_arguments(ARGS "" "${oneValueArgs}" "" ${ARGN}) @@ -111,7 +121,7 @@ set(_prefix "${ARGS_PREFIX}") find_package(WaylandScanner REQUIRED QUIET) - ecm_add_wayland_client_protocol(${out_var} + ecm_add_wayland_client_protocol(${target_or_sources_var} PROTOCOL ${ARGS_PROTOCOL} BASENAME ${ARGS_BASENAME}) @@ -131,12 +141,16 @@ set_property(SOURCE ${_header} ${_code} PROPERTY SKIP_AUTOMOC ON) - list(APPEND ${out_var} "${_code}") - set(${out_var} ${${out_var}} PARENT_SCOPE) + if (TARGET ${target_or_sources_var}) + target_sources(${target_or_sources_var} PRIVATE "${_code}") + else() + list(APPEND ${target_or_sources_var} "${_code}") + set(${target_or_sources_var} ${${target_or_sources_var}} PARENT_SCOPE) + endif() endfunction() -function(ecm_add_qtwayland_server_protocol out_var) +function(ecm_add_qtwayland_server_protocol target_or_sources_var) # Parse arguments set(oneValueArgs PROTOCOL BASENAME PREFIX) cmake_parse_arguments(ARGS "" "${oneValueArgs}" "" ${ARGN}) @@ -148,7 +162,7 @@ set(_prefix "${ARGS_PREFIX}") find_package(WaylandScanner REQUIRED QUIET) - ecm_add_wayland_server_protocol(${out_var} + ecm_add_wayland_server_protocol(${target_or_sources_var} PROTOCOL ${ARGS_PROTOCOL} BASENAME ${ARGS_BASENAME}) @@ -168,6 +182,10 @@ set_property(SOURCE ${_header} ${_code} PROPERTY SKIP_AUTOMOC ON) - list(APPEND ${out_var} "${_code}") - set(${out_var} ${${out_var}} PARENT_SCOPE) + if (TARGET ${target_or_sources_var}) + target_sources(${target_or_sources_var} PRIVATE "${_code}") + else() + list(APPEND ${target_or_sources_var} "${_code}") + set(${target_or_sources_var} ${${target_or_sources_var}} PARENT_SCOPE) + endif() endfunction() diff -Nru extra-cmake-modules-5.92.0/find-modules/FindWaylandScanner.cmake extra-cmake-modules-5.98.0/find-modules/FindWaylandScanner.cmake --- extra-cmake-modules-5.92.0/find-modules/FindWaylandScanner.cmake 2022-02-27 20:48:24.000000000 +0000 +++ extra-cmake-modules-5.98.0/find-modules/FindWaylandScanner.cmake 2022-08-27 09:14:28.000000000 +0000 @@ -34,23 +34,31 @@ :: + ecm_add_wayland_client_protocol( + PROTOCOL + BASENAME ) + ecm_add_wayland_client_protocol( PROTOCOL BASENAME ) Generate Wayland client protocol files from ```` XML definition for the ```` interface and append those files -to ````. +to ```` or ````. :: + ecm_add_wayland_server_protocol( + PROTOCOL + BASENAME ) + ecm_add_wayland_server_protocol( PROTOCOL BASENAME ) Generate Wayland server protocol files from ```` XML definition for the ```` interface and append those files -to ````. +to ```` or ````. Since 1.4.0. #]=======================================================================] @@ -88,7 +96,7 @@ include(CMakeParseArguments) -function(ecm_add_wayland_client_protocol out_var) +function(ecm_add_wayland_client_protocol target_or_sources_var) # Parse arguments set(oneValueArgs PROTOCOL BASENAME) cmake_parse_arguments(ARGS "" "${oneValueArgs}" "" ${ARGN}) @@ -113,12 +121,16 @@ COMMAND ${WaylandScanner_EXECUTABLE} public-code ${_infile} ${_code} DEPENDS ${_infile} ${_client_header} VERBATIM) - list(APPEND ${out_var} "${_client_header}" "${_code}") - set(${out_var} ${${out_var}} PARENT_SCOPE) + if (TARGET ${target_or_sources_var}) + target_sources(${target_or_sources_var} PRIVATE "${_client_header}" "${_code}") + else() + list(APPEND ${target_or_sources_var} "${_client_header}" "${_code}") + set(${target_or_sources_var} ${${target_or_sources_var}} PARENT_SCOPE) + endif() endfunction() -function(ecm_add_wayland_server_protocol out_var) +function(ecm_add_wayland_server_protocol target_or_sources_var) # Parse arguments set(oneValueArgs PROTOCOL BASENAME) cmake_parse_arguments(ARGS "" "${oneValueArgs}" "" ${ARGN}) @@ -127,7 +139,7 @@ message(FATAL_ERROR "Unknown keywords given to ecm_add_wayland_server_protocol(): \"${ARGS_UNPARSED_ARGUMENTS}\"") endif() - ecm_add_wayland_client_protocol(${out_var} + ecm_add_wayland_client_protocol(${target_or_sources_var} PROTOCOL ${ARGS_PROTOCOL} BASENAME ${ARGS_BASENAME}) @@ -141,6 +153,10 @@ COMMAND ${WaylandScanner_EXECUTABLE} server-header ${_infile} ${_server_header} DEPENDS ${_infile} VERBATIM) - list(APPEND ${out_var} "${_server_header}") - set(${out_var} ${${out_var}} PARENT_SCOPE) + if (TARGET ${target_or_sources_var}) + target_sources(${target_or_sources_var} PRIVATE "${_server_header}") + else() + list(APPEND ${target_or_sources_var} "${_server_header}") + set(${target_or_sources_var} ${${target_or_sources_var}} PARENT_SCOPE) + endif() endfunction() diff -Nru extra-cmake-modules-5.92.0/find-modules/FindXCB.cmake extra-cmake-modules-5.98.0/find-modules/FindXCB.cmake --- extra-cmake-modules-5.92.0/find-modules/FindXCB.cmake 2022-02-27 20:48:24.000000000 +0000 +++ extra-cmake-modules-5.98.0/find-modules/FindXCB.cmake 2022-08-27 09:14:28.000000000 +0000 @@ -24,8 +24,8 @@ XKB XPRINT XTEST XV XVMC If no components are specified, this module will act as though all components -except XINPUT (which is considered unstable) were passed to -OPTIONAL_COMPONENTS. +were passed to OPTIONAL_COMPONENTS. Before 5.82 this excluded XINPUT. Since 5.82 +all components are searched for. This module will define the following variables, independently of the components searched for or found: @@ -107,10 +107,6 @@ XVMC ) -# XINPUT is unstable; do not include it by default -set(XCB_default_components ${XCB_known_components}) -list(REMOVE_ITEM XCB_default_components "XINPUT") - # default component info: xcb components have fairly predictable # header files, library names and pkg-config names foreach(_comp ${XCB_known_components}) @@ -153,11 +149,6 @@ DEFAULT_COMPONENTS ${XCB_default_components} ) -list(FIND XCB_components "XINPUT" _XCB_XINPUT_index) -if (NOT _XCB_XINPUT_index EQUAL -1) - message(AUTHOR_WARNING "XINPUT from XCB was requested: this is EXPERIMENTAL and is likely to unavailable on many systems!") -endif() - ecm_find_package_handle_library_components(XCB COMPONENTS ${XCB_components} ) diff -Nru extra-cmake-modules-5.92.0/.gitlab-ci.yml extra-cmake-modules-5.98.0/.gitlab-ci.yml --- extra-cmake-modules-5.92.0/.gitlab-ci.yml 2022-02-27 20:48:24.000000000 +0000 +++ extra-cmake-modules-5.98.0/.gitlab-ci.yml 2022-08-27 09:14:28.000000000 +0000 @@ -7,6 +7,8 @@ - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/android-qt6.yml - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux-qt6.yml + - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/windows.yml + - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd-qt6.yml docs: # only: diff -Nru extra-cmake-modules-5.92.0/.kde-ci.yml extra-cmake-modules-5.98.0/.kde-ci.yml --- extra-cmake-modules-5.92.0/.kde-ci.yml 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.98.0/.kde-ci.yml 2022-08-27 09:14:28.000000000 +0000 @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: None +# SPDX-License-Identifier: CC0-1.0 + +Options: + require-passing-tests-on: [ 'Linux', 'FreeBSD' ] diff -Nru extra-cmake-modules-5.92.0/kde-modules/KDEClangFormat.cmake extra-cmake-modules-5.98.0/kde-modules/KDEClangFormat.cmake --- extra-cmake-modules-5.92.0/kde-modules/KDEClangFormat.cmake 2022-02-27 20:48:24.000000000 +0000 +++ extra-cmake-modules-5.98.0/kde-modules/KDEClangFormat.cmake 2022-08-27 09:14:28.000000000 +0000 @@ -27,15 +27,15 @@ added to version control. It is recommended to add it to the ``.gitignore`` file: ``/.clang-format``. Since 5.79: If the source folder already contains a .clang-format file it is not overwritten. -Since version 5.80 this function is called by default in KDEFrameworkCompilerSettings. If directories should be excluded from -the formatting a .clang-format file with "DisableFormat: true" and "SortIncludes: false" should be created. +Since version 5.80 this function is called by default in :kde-module:`KDEFrameworkCompilerSettings`. If directories should be excluded from +the formatting a .clang-format file with ``DisableFormat: true`` and ``SortIncludes: false`` should be created. Example usage: .. code-block:: cmake include(KDEClangFormat) - file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h) + file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.hpp *.c) kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) To exclude directories from the formatting add a ``.clang-format`` diff -Nru extra-cmake-modules-5.92.0/kde-modules/KDECMakeSettings.cmake extra-cmake-modules-5.98.0/kde-modules/KDECMakeSettings.cmake --- extra-cmake-modules-5.92.0/kde-modules/KDECMakeSettings.cmake 2022-02-27 20:48:24.000000000 +0000 +++ extra-cmake-modules-5.98.0/kde-modules/KDECMakeSettings.cmake 2022-08-27 09:14:28.000000000 +0000 @@ -14,7 +14,7 @@ Changes various CMake settings to what the KDE community views as more sensible defaults. -It is recommended to include this module with the NO_POLICY_SCOPE flag, +It is recommended to include this module with the ``NO_POLICY_SCOPE`` flag, otherwise you may get spurious warnings with some versions of CMake. It is split into three parts, which can be independently disabled if desired. @@ -24,25 +24,26 @@ The default runtime path (used on Unix systems to search for dynamically-linked libraries) is set to include the location that libraries -will be installed to (as set in LIB_INSTALL_DIR or, if the former is not set, -KDE_INSTALL_LIBDIR), and also the linker search path. +will be installed to (as set in ``LIB_INSTALL_DIR`` or, if the former is not set, +``KDE_INSTALL_LIBDIR``), and also the linker search path. -Note that ``LIB_INSTALL_DIR`` or alternatively ``KDE_INSTALL_LIBDIR`` needs -to be set before including this module. -Typically, this is done by including the :kde-module:`KDEInstallDirs` module. +.. note:: + ``LIB_INSTALL_DIR`` or alternatively ``KDE_INSTALL_LIBDIR`` needs + to be set before including this module. + Typically, this is done by including the :kde-module:`KDEInstallDirs` module. -This section can be disabled by setting ``KDE_SKIP_RPATH_SETTINGS`` to TRUE +This section can be disabled by setting ``KDE_SKIP_RPATH_SETTINGS`` to ``TRUE`` before including this module. Testing ~~~~~~~ -Testing is enabled by default, and an option (BUILD_TESTING) is provided for +Testing is enabled by default, and an option ``BUILD_TESTING`` is provided for users to control this. See the CTest module documentation in the CMake manual for more details. -This section can be disabled by setting ``KDE_SKIP_TEST_SETTINGS`` to TRUE +This section can be disabled by setting ``KDE_SKIP_TEST_SETTINGS`` to ``TRUE`` before including this module. @@ -52,18 +53,18 @@ Various CMake build defaults are altered, such as searching source and build directories for includes first, enabling automoc by default. -When find_package(ECM 5.38) or higher is called, this also selects +When ``find_package(ECM 5.38)`` or higher is called, this also selects a layout for the build dir that helps running executables without installing: all executables are built into a toplevel "bin" dir, making it possible to find helper binaries, and to find uninstalled plugins (provided that you use -kcoreaddons_add_plugin or set LIBRARY_OUTPUT_DIRECTORY as documented on +``kcoreaddons_add_plugin()`` or set ``LIBRARY_OUTPUT_DIRECTORY`` as documented on https://community.kde.org/Guidelines_and_HOWTOs/Making_apps_run_uninstalled). -This section can be disabled by setting ``KDE_SKIP_BUILD_SETTINGS`` to TRUE +This section can be disabled by setting ``KDE_SKIP_BUILD_SETTINGS`` to ``TRUE`` before including this module. -This section also provides an "uninstall" target that can be individually -disabled by setting ``KDE_SKIP_UNINSTALL_TARGET`` to TRUE before including +This section also provides an ``uninstall`` target that can be individually +disabled by setting ``KDE_SKIP_UNINSTALL_TARGET`` to ``TRUE`` before including this module. By default on OS X, X11 and XCB related detections are disabled. However if @@ -75,7 +76,7 @@ Since pre-1.0.0. -``ENABLE_CLAZY`` option is added (OFF by default) when clang is being used. +``ENABLE_CLAZY`` option is added (``OFF`` by default) when clang is being used. Turning this option on will force clang to load the clazy plugins for richer warnings on Qt-related code. @@ -84,10 +85,10 @@ Since 5.17.0 -- Uninstall target functionality since 1.7.0. +- ``uninstall`` target functionality since 1.7.0 - ``APPLE_FORCE_X11`` option since 5.14.0 (detecting X11 was previously the default behavior) - ``APPLE_SUPPRESS_X11_WARNING`` option since 5.14.0 -- CMAKE_AUTORCC enabled by default when supported by cmake (>= 3.0) since 5.62.0 +- ``CMAKE_AUTORCC`` enabled by default when supported by CMake (>= 3.0) since 5.62.0 Translations ~~~~~~~~~~~~ @@ -97,12 +98,12 @@ ``KDE_L10N_BRANCH`` will be responsible for choosing which l10n branch to use for the translations. -``KDE_L10N_AUTO_TRANSLATIONS`` (OFF by default) will indicate whether translations +``KDE_L10N_AUTO_TRANSLATIONS`` (``OFF`` by default) will indicate whether translations should be downloaded when building the project. Since 5.34.0 -``KDE_L10N_SYNC_TRANSLATIONS`` (OFF by default) will download the translations at configuration +``KDE_L10N_SYNC_TRANSLATIONS`` (``OFF`` by default) will download the translations at configuration time instead of build time. Since 5.50.0 @@ -301,15 +302,19 @@ OUTPUT_VARIABLE upstream_ref RESULT_VARIABLE exitCode WORKING_DIRECTORY "${dir}") - string(REGEX REPLACE "refs/remotes/([^/]+)/.*" "\\1" gitorigin "${upstream_ref}") if(exitCode EQUAL 0) + string(REGEX REPLACE "refs/remotes/([^/]+)/.*" "\\1" gitorigin "${upstream_ref}") message(DEBUG "Git upstream inferred as ${gitorigin}, upstream ref was ${upstream_ref}") - execute_process(COMMAND git remote get-url --all "${gitorigin}" - OUTPUT_VARIABLE giturl - RESULT_VARIABLE exitCode - WORKING_DIRECTORY "${dir}") + else() + set(gitorigin "origin") + message(DEBUG "Assuming origin as the git remote as we are in detached mode") endif() + execute_process(COMMAND git remote get-url --all "${gitorigin}" + OUTPUT_VARIABLE giturl + RESULT_VARIABLE exitCode + WORKING_DIRECTORY "${dir}") + if(exitCode EQUAL 0) message(DEBUG "Git URL inferred as ${giturl}") string(REGEX MATCHALL ".+kde\\.org[:\\/]([-A-Za-z0-9\\/]+)(.git)?\\s*" "" ${giturl}) diff -Nru extra-cmake-modules-5.92.0/kde-modules/KDECompilerSettings.cmake extra-cmake-modules-5.98.0/kde-modules/KDECompilerSettings.cmake --- extra-cmake-modules-5.92.0/kde-modules/KDECompilerSettings.cmake 2022-02-27 20:48:24.000000000 +0000 +++ extra-cmake-modules-5.98.0/kde-modules/KDECompilerSettings.cmake 2022-08-27 09:14:28.000000000 +0000 @@ -16,11 +16,12 @@ Enables many more warnings than the default, and sets stricter modes for some compiler features. By default, exceptions are disabled; -kde_target_enable_exceptions() can be used to re-enable them for a +``kde_target_enable_exceptions()`` can be used to re-enable them for a specific target. -NB: it is recommended to include this module with the NO_POLICY_SCOPE -flag, otherwise you may get spurious warnings with some versions of CMake. +.. note:: + It is recommended to include this module with the ``NO_POLICY_SCOPE`` + flag, otherwise you may get spurious warnings with some versions of CMake. Since 5.85 newer settings are controlled by a variable ``KDE_COMPILERSETTINGS_LEVEL``, taking an ECM version as value. That @@ -88,6 +89,8 @@ before including this module (default is ``FALSE`` for ``KDE_COMPILERSETTINGS_LEVEL`` >= 5.85, ``TRUE`` otherwise). +- ``-Werror=undef`` (GNU and Clang compilers, since 5.96.0) + - Qt related preprocessor definitions (since 5.85.0): - ``-DQT_NO_CAST_TO_ASCII`` @@ -141,15 +144,15 @@ Inclusion of this module defines the following variables: ``ENABLE_BSYMBOLICFUNCTIONS`` - indicates whether we make use of -Bsymbolic-functions for linking. + indicates whether we make use of ``-Bsymbolic-functions`` for linking. It ensures libraries bind global function references locally rather than at runtime. This option only has an effect on ELF-based systems. The option is disabled by default except when using - KDEFrameworkCompilerSettings.cmake where it's enabled. Projects can enable - it by calling set(ENABLE_BSYMBOLICFUNCTIONS ON) or passing -DENABLE - BSYMBOLICFUNCTIONS=ON when configuring the build directory. + :kde-module:`KDEFrameworkCompilerSettings` where it's enabled. Projects can enable + it by calling ``set(ENABLE_BSYMBOLICFUNCTIONS ON)`` or passing + ``-DENABLE BSYMBOLICFUNCTIONS=ON`` when configuring the build directory. Since 5.85 @@ -538,8 +541,11 @@ set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings ${CMAKE_MODULE_LINKER_FLAGS}") # Do not allow undefined symbols, even in non-symbolic shared libraries - set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}") - set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_MODULE_LINKER_FLAGS}") + # On OpenBSD we must disable this to allow the stuff to properly compile without explicit libc specification + if (NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD") + set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}") + set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_MODULE_LINKER_FLAGS}") + endif() endif() set(_KDE_GCC_COMMON_WARNING_FLAGS "-Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef") @@ -558,6 +564,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_KDE_GCC_COMMON_WARNING_FLAGS} -Wnon-virtual-dtor -Woverloaded-virtual") # Make some warnings errors set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=return-type -Werror=init-self") + if (KDE_INTERNAL_COMPILERSETTINGS_LEVEL VERSION_GREATER_EQUAL 5.96.0) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=undef") + endif() endif() if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 3.5)) diff -Nru extra-cmake-modules-5.92.0/kde-modules/KDEFrameworkCompilerLegacySettings.cmake extra-cmake-modules-5.98.0/kde-modules/KDEFrameworkCompilerLegacySettings.cmake --- extra-cmake-modules-5.92.0/kde-modules/KDEFrameworkCompilerLegacySettings.cmake 2022-02-27 20:48:24.000000000 +0000 +++ extra-cmake-modules-5.98.0/kde-modules/KDEFrameworkCompilerLegacySettings.cmake 2022-08-27 09:14:28.000000000 +0000 @@ -76,6 +76,6 @@ if (ECM_GLOBAL_FIND_VERSION VERSION_GREATER_EQUAL 5.80.0) include(KDEClangFormat) # add clang-format target - file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.c) + file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.hpp *.c) kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) endif () diff -Nru extra-cmake-modules-5.92.0/kde-modules/KDEFrameworkCompilerSettings.cmake extra-cmake-modules-5.98.0/kde-modules/KDEFrameworkCompilerSettings.cmake --- extra-cmake-modules-5.92.0/kde-modules/KDEFrameworkCompilerSettings.cmake 2022-02-27 20:48:24.000000000 +0000 +++ extra-cmake-modules-5.98.0/kde-modules/KDEFrameworkCompilerSettings.cmake 2022-08-27 09:14:28.000000000 +0000 @@ -15,16 +15,17 @@ Do not use this module for software which is not part of KDE-Frameworks. There is no guarantee for backward-compatibility in newer versions. -The KDECompilerSettings module is included and, in addition, various +The :kde-module:`KDECompilerSettings` module is included and, in addition, various defines that affect the Qt libraries are set to enforce certain conventions. -For example, constructions like QString("foo") are prohibited, instead +For example, constructions like ``QString("foo")`` are prohibited, instead forcing the use of QLatin1String or QStringLiteral, and some Qt-defined keywords like signals and slots will not be defined. -NB: it is recommended to include this module with the NO_POLICY_SCOPE -flag, otherwise you may get spurious warnings with some versions of CMake. +.. note:: + It is recommended to include this module with the NO_POLICY_SCOPE + flag, otherwise you may get spurious warnings with some versions of CMake. Since pre-1.0.0. #]=======================================================================] @@ -56,13 +57,10 @@ # Current defaults include(KDECompilerSettings NO_POLICY_SCOPE) -# enable warnings for any deprecated Qt/KF API of current 5 series -add_definitions( - -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 - -DKF_DEPRECATED_WARNINGS_SINCE=0x060000 -) - # add clang-format target include(KDEClangFormat) -file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.c) +file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.hpp *.c) kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) + +# add the metainfo platform check +include(KDEMetaInfoPlatformCheck) diff -Nru extra-cmake-modules-5.92.0/kde-modules/kde-git-commit-hooks/clang-format.sh extra-cmake-modules-5.98.0/kde-modules/kde-git-commit-hooks/clang-format.sh --- extra-cmake-modules-5.92.0/kde-modules/kde-git-commit-hooks/clang-format.sh 2022-02-27 20:48:24.000000000 +0000 +++ extra-cmake-modules-5.98.0/kde-modules/kde-git-commit-hooks/clang-format.sh 2022-08-27 09:14:28.000000000 +0000 @@ -2,17 +2,23 @@ # Based on okular/hooks/pre-commit, credits go to Albert Astals Cid -readonly output=$(git clang-format -v --diff) +readonly output=$(git clang-format --extensions 'cpp,h,hpp,c' -v --diff) if [[ ! -f .clang-format ]]; then - echo "ERROR: no .clang-format file found in repository root, abort format" - echo " run cmake for this repository to generate it" + if [[ @HAS_CLANG_FORMAT_COMMAND_INCLUDED@ = TRUE ]]; then + echo "ERROR: no .clang-format file found in repository root, abort format" + echo " run cmake for this repository to generate it" + else + echo "ERROR: no .clang-format file found in repository root, abort format" + echo "Make sure the KDEClangFormat CMake module is included, which will copy the KDE .clang-format file during the CMake configuration." + echo "Alternatively you can manually copy a .clang-format file to the repository root directory." + fi exit 1 fi if [[ "$output" == *"no modified files to format"* ]]; then exit 0; fi if [[ "$output" == *"clang-format did not modify any files"* ]]; then exit 0; fi echo "ERROR: You have unformatted changes, please format your files. You can do this using the following commands:" -echo " git clang-format --force # format the changed parts" -echo " git clang-format --diff # preview the changes done by the formatter" +echo " git clang-format --extensions 'cpp,h,hpp,c' --force # format the changed parts" +echo " git clang-format --extensions 'cpp,h,hpp,c' --diff # preview the changes done by the formatter" exit 1 diff -Nru extra-cmake-modules-5.92.0/kde-modules/KDEGitCommitHooks.cmake extra-cmake-modules-5.98.0/kde-modules/KDEGitCommitHooks.cmake --- extra-cmake-modules-5.92.0/kde-modules/KDEGitCommitHooks.cmake 2022-02-27 20:48:24.000000000 +0000 +++ extra-cmake-modules-5.98.0/kde-modules/KDEGitCommitHooks.cmake 2022-08-27 09:14:28.000000000 +0000 @@ -1,4 +1,5 @@ # SPDX-FileCopyrightText: 2020 Alexander Lohnau +# SPDX-FileCopyrightText: 2022 Ahmad Samir # # SPDX-License-Identifier: BSD-3-Clause @@ -50,27 +51,65 @@ set(_multiValueArgs CHECKS) cmake_parse_arguments(ARG "" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN} ) + if(NOT CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) + message(STATUS "Project is not top level project - pre-commit hook not installed") + return() + endif() + if(NOT ARG_CHECKS) message(FATAL_ERROR "No checks were specified") endif() set(GIT_DIR "${CMAKE_SOURCE_DIR}/.git") - # In case of tarballs there is no .git directory - if (IS_DIRECTORY ${GIT_DIR}) - # The pre-commit hook is a bash script, consequently it won't work on non-unix platforms - # git on Windows provides its own bash - if (UNIX OR WIN32) - if(KDE_CLANG_FORMAT_EXECUTABLE) - list(FIND ARG_CHECKS "CLANG_FORMAT" _index) - if (${_index} GREATER -1) - set(CLANG_FORMAT_SCRIPT "\"$(git rev-parse --git-common-dir)\"/hooks/scripts/clang-format.sh") - configure_file(${CLANG_FORMAT_UNIX} "${GIT_DIR}/hooks/scripts/clang-format.sh" @ONLY) - endif() - else() - message(WARNING "No clang-format executable was found, skipping the formatting pre-commit hook") - endif() + if (NOT IS_DIRECTORY ${GIT_DIR} # In case of tarballs there is no .git directory + OR NOT (UNIX OR WIN32) + ) + return() + endif() + if (COMMAND KDE_CLANG_FORMAT) + set(HAS_CLANG_FORMAT_COMMAND_INCLUDED TRUE) + else() + set(HAS_CLANG_FORMAT_COMMAND_INCLUDED FALSE) + endif() - configure_file(${PRE_COMMIT_HOOK_UNIX} "${GIT_DIR}/hooks/pre-commit") + set(_write_hook FALSE) + if(KDE_CLANG_FORMAT_EXECUTABLE) + list(FIND ARG_CHECKS "CLANG_FORMAT" _index) + if (${_index} GREATER -1) + set(CLANG_FORMAT_SCRIPT "\"$(git rev-parse --git-common-dir)\"/hooks/scripts/clang-format.sh") + configure_file(${CLANG_FORMAT_UNIX} "${GIT_DIR}/hooks/scripts/clang-format.sh" @ONLY) + set(_write_hook TRUE) endif() + else() + message(WARNING "No clang-format executable was found, skipping the formatting pre-commit hook") + endif() + + if(NOT _write_hook) + return() + endif() + + set(_hook_file "${GIT_DIR}/hooks/pre-commit") + # Doesn't exist? write away + if(NOT EXISTS ${_hook_file}) + configure_file(${PRE_COMMIT_HOOK_UNIX} "${GIT_DIR}/hooks/pre-commit") + return() + endif() + + file(READ ${_hook_file} _contents) + + # For when CLANG_FORMAT_SCRIPT didn't have the 'git rev-parse --git-common-dir' part + set(_old_cmd "./.git/hooks/scripts/clang-format.sh") + string(FIND "${_contents}" "${_old_cmd}" _idx) + if (${_idx} GREATER -1) + string(REPLACE "${_old_cmd}" "${CLANG_FORMAT_SCRIPT}" _contents "${_contents}") + file(WRITE ${_hook_file} "${_contents}") + return() + endif() + + string(FIND "${_contents}" "${CLANG_FORMAT_SCRIPT}" _idx) + # File exists and doesn't have the clang-format.sh line, append it + # so as to not overwrite users' customisations + if (_idx EQUAL -1) + file(APPEND ${_hook_file} "${CLANG_FORMAT_SCRIPT}") endif() endfunction() diff -Nru extra-cmake-modules-5.92.0/kde-modules/KDEInstallDirs5.cmake extra-cmake-modules-5.98.0/kde-modules/KDEInstallDirs5.cmake --- extra-cmake-modules-5.92.0/kde-modules/KDEInstallDirs5.cmake 2022-02-27 20:48:24.000000000 +0000 +++ extra-cmake-modules-5.98.0/kde-modules/KDEInstallDirs5.cmake 2022-08-27 09:14:28.000000000 +0000 @@ -152,30 +152,30 @@ Systemd User Units (``lib/systemd/user``) [``SYSTEMD_USER_UNIT_INSTALL_DIR``]. Since 5.65 -If ``KDE_INSTALL_USE_QT_SYS_PATHS`` is set to TRUE before including this +If ``KDE_INSTALL_USE_QT_SYS_PATHS`` is set to ``TRUE`` before including this module, the default values for some variables are instead queried from Qt5's qmake (where mentioned in the parentheses above). -If not set, it will default to TRUE if Qt5's qmake is found and +If not set, it will default to ``TRUE`` if Qt5's qmake is found and it's ``QT_INSTALL_PREFIX`` is the same as ``CMAKE_INSTALL_PREFIX``, -otherwise default to FALSE. +otherwise default to ``FALSE``. This variable should NOT be set from within CMakeLists.txt files, instead is intended to be set manually when configuring a project which uses KDEInstallDirs (e.g. by packagers). -If ``KDE_INSTALL_DIRS_NO_DEPRECATED`` is set to TRUE before including this +If ``KDE_INSTALL_DIRS_NO_DEPRECATED`` is set to ``TRUE`` before including this module, the deprecated variables (listed in the square brackets above) are not defined. In addition, for each ``KDE_INSTALL_*`` variable, an equivalent ``CMAKE_INSTALL_*`` variable is defined. If -``KDE_INSTALL_DIRS_NO_DEPRECATED`` is set to TRUE, only those variables +``KDE_INSTALL_DIRS_NO_DEPRECATED`` is set to ``TRUE``, only those variables defined by the ``GNUInstallDirs`` module (shipped with CMake) are defined. -If ``KDE_INSTALL_DIRS_NO_CMAKE_VARIABLES`` is set to TRUE, no variables with +If ``KDE_INSTALL_DIRS_NO_CMAKE_VARIABLES`` is set to ``TRUE``, no variables with a ``CMAKE_`` prefix will be defined by this module (other than -CMAKE_INSTALL_DEFAULT_COMPONENT_NAME - see below). +``CMAKE_INSTALL_DEFAULT_COMPONENT_NAME`` - see below). The ``KDE_INSTALL_`` variables (or their ``CMAKE_INSTALL_`` or -deprecated counterparts) may be passed to the DESTINATION options of +deprecated counterparts) may be passed to the ``DESTINATION`` options of ``install()`` commands for the corresponding file type. They are set in the CMake cache, and so the defaults above can be overridden by users. @@ -209,7 +209,7 @@ ``-DKDE_INSTALL_LIBDIR=lib64`` instead of ``-DKDE_INSTALL_LIBDIR=/usr/lib/lib64`` to override the library directory). -Since 5.82.0, prior to that available as KDEInstallDirs. +Since 5.82.0, prior to that available as :kde-module:`KDEInstallDirs`. NB: The variables starting ``KDE_INSTALL_`` are available since 1.6.0, unless otherwise noted with the variable. @@ -231,11 +231,11 @@ set(KF5_LIBEXEC_INSTALL_DIR "${CMAKE_INSTALL_LIBEXECDIR_KF5}") endif() -include("${ECM_MODULE_DIR}/ECMQueryQmake.cmake") +include("${ECM_MODULE_DIR}/ECMQueryQt.cmake") set(_default_KDE_INSTALL_USE_QT_SYS_PATHS OFF) if(NOT DEFINED KDE_INSTALL_USE_QT_SYS_PATHS) - query_qmake(qt_install_prefix_dir QT_INSTALL_PREFIX TRY) + ecm_query_qt(qt_install_prefix_dir QT_INSTALL_PREFIX TRY) if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}") message(STATUS "Installing in the same prefix as Qt, adopting their path scheme.") set(_default_KDE_INSTALL_USE_QT_SYS_PATHS ON) @@ -245,8 +245,8 @@ option (KDE_INSTALL_USE_QT_SYS_PATHS "Install mkspecs files, QCH files for Qt-based libs, Plugins and Imports to the Qt 5 install dir" "${_default_KDE_INSTALL_USE_QT_SYS_PATHS}") if(KDE_INSTALL_USE_QT_SYS_PATHS) # Qt-specific vars - query_qmake(qt_install_prefix_dir QT_INSTALL_PREFIX TRY) - query_qmake(qt_plugins_dir QT_INSTALL_PLUGINS) + ecm_query_qt(qt_install_prefix_dir QT_INSTALL_PREFIX TRY) + ecm_query_qt(qt_plugins_dir QT_INSTALL_PLUGINS) if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}") file(RELATIVE_PATH qt_plugins_dir ${qt_install_prefix_dir} ${qt_plugins_dir}) @@ -255,7 +255,7 @@ "Qt plugins" QT_PLUGIN_INSTALL_DIR) - query_qmake(qt_imports_dir QT_INSTALL_IMPORTS) + ecm_query_qt(qt_imports_dir QT_INSTALL_IMPORTS) if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}") file(RELATIVE_PATH qt_imports_dir ${qt_install_prefix_dir} ${qt_imports_dir}) @@ -264,7 +264,7 @@ "QtQuick1 imports" IMPORTS_INSTALL_DIR) - query_qmake(qt_qml_dir QT_INSTALL_QML) + ecm_query_qt(qt_qml_dir QT_INSTALL_QML) if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}") file(RELATIVE_PATH qt_qml_dir ${qt_install_prefix_dir} ${qt_qml_dir}) @@ -308,7 +308,7 @@ # Qt-specific data vars if(KDE_INSTALL_USE_QT_SYS_PATHS) - query_qmake(qt_docs_dir QT_INSTALL_DOCS) + ecm_query_qt(qt_docs_dir QT_INSTALL_DOCS) _define_absolute(QTQCHDIR ${qt_docs_dir} "documentation bundles in QCH format for Qt-extending libraries") diff -Nru extra-cmake-modules-5.92.0/kde-modules/KDEInstallDirs6.cmake extra-cmake-modules-5.98.0/kde-modules/KDEInstallDirs6.cmake --- extra-cmake-modules-5.92.0/kde-modules/KDEInstallDirs6.cmake 2022-02-27 20:48:24.000000000 +0000 +++ extra-cmake-modules-5.98.0/kde-modules/KDEInstallDirs6.cmake 2022-08-27 09:14:28.000000000 +0000 @@ -132,12 +132,12 @@ ``SYSTEMDUSERUNITDIR`` Systemd User Units (``lib/systemd/user``) -If ``KDE_INSTALL_USE_QT_SYS_PATHS`` is set to TRUE before including this +If ``KDE_INSTALL_USE_QT_SYS_PATHS`` is set to ``TRUE`` before including this module, the default values for some variables are instead queried from Qt6's qmake (where mentioned in the parentheses above). -If not set, it will default to TRUE if Qt6's qmake is found and +If not set, it will default to ``TRUE`` if Qt6's qmake is found and it's ``QT_INSTALL_PREFIX`` is the same as ``CMAKE_INSTALL_PREFIX``, -otherwise default to FALSE. +otherwise default to ``FALSE``. This variable should NOT be set from within CMakeLists.txt files, instead is intended to be set manually when configuring a project which uses KDEInstallDirs (e.g. by packagers). @@ -145,11 +145,11 @@ In addition, for each ``KDE_INSTALL_*`` variable, an equivalent ``CMAKE_INSTALL_*`` variable is defined, if such a variable is also defined by the ``GNUInstallDirs`` module (shipped with CMake). -If ``KDE_INSTALL_DIRS_NO_CMAKE_VARIABLES`` is set to TRUE, no variables with +If ``KDE_INSTALL_DIRS_NO_CMAKE_VARIABLES`` is set to ``TRUE``, no variables with a ``CMAKE_`` prefix will be defined by this module (other than -CMAKE_INSTALL_DEFAULT_COMPONENT_NAME - see below). +``CMAKE_INSTALL_DEFAULT_COMPONENT_NAME`` - see below). -The ``KDE_INSTALL_`` variables may be passed to the DESTINATION options of +The ``KDE_INSTALL_`` variables may be passed to the ``DESTINATION`` options of ``install()`` commands for the corresponding file type. They are set in the CMake cache, and so the defaults above can be overridden by users. @@ -197,9 +197,8 @@ _define_non_cache(LIBEXECDIR_KF "${CMAKE_INSTALL_LIBEXECDIR}/kf6") endif() -find_package(Qt6 COMPONENTS CoreTools REQUIRED CONFIG) -get_target_property(qtpaths_executable Qt6::qtpaths LOCATION) -execute_process(COMMAND ${qtpaths_executable} --query QT_INSTALL_PREFIX OUTPUT_VARIABLE qt_install_prefix_dir) +include(${ECM_MODULE_DIR}/ECMQueryQt.cmake) +ecm_query_qt(qt_install_prefix_dir QT_INSTALL_PREFIX) set(_qt_prefix_is_cmake_install_prefix FALSE) if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}") @@ -221,13 +220,13 @@ if(KDE_INSTALL_USE_QT_SYS_PATHS) # Qt-specific vars - execute_process(COMMAND ${qtpaths_executable} --query QT_INSTALL_PLUGINS OUTPUT_VARIABLE qt_plugins_dir) + ecm_query_qt(qt_plugins_dir QT_INSTALL_PLUGINS) if(_qt_prefix_is_cmake_install_prefix) file(RELATIVE_PATH qt_plugins_dir ${qt_install_prefix_dir} ${qt_plugins_dir}) endif() _define_absolute(QTPLUGINDIR ${qt_plugins_dir} "Qt plugins") - execute_process(COMMAND ${qtpaths_executable} --query QT_INSTALL_QML OUTPUT_VARIABLE qt_qml_dir) + ecm_query_qt(qt_qml_dir QT_INSTALL_QML) if(_qt_prefix_is_cmake_install_prefix) file(RELATIVE_PATH qt_qml_dir ${qt_install_prefix_dir} ${qt_qml_dir}) endif() @@ -254,7 +253,7 @@ # Qt-specific data vars if(KDE_INSTALL_USE_QT_SYS_PATHS) - execute_process(COMMAND ${qtpaths_executable} --query QT_INSTALL_DOCS OUTPUT_VARIABLE qt_docs_dir) + ecm_query_qt(qt_docs_dir QT_INSTALL_DOCS) _define_absolute(QTQCHDIR ${qt_docs_dir} "documentation bundles in QCH format for Qt-extending libraries") else() diff -Nru extra-cmake-modules-5.92.0/kde-modules/KDEInstallDirs.cmake extra-cmake-modules-5.98.0/kde-modules/KDEInstallDirs.cmake --- extra-cmake-modules-5.92.0/kde-modules/KDEInstallDirs.cmake 2022-02-27 20:48:24.000000000 +0000 +++ extra-cmake-modules-5.98.0/kde-modules/KDEInstallDirs.cmake 2022-08-27 09:14:28.000000000 +0000 @@ -6,9 +6,9 @@ KDEInstallDirs -------------- -Compatibility wrapper around KDEInstallDirs5. +Compatibility wrapper around :kde-module:`KDEInstallDirs5`. -Since 5.82.0, prior to that equivalent to KDEInstallDirs5. +Since 5.82.0, prior to that equivalent to :kde-module:`KDEInstallDirs5`. #]=======================================================================] include(${CMAKE_CURRENT_LIST_DIR}/../modules/QtVersionOption.cmake) diff -Nru extra-cmake-modules-5.92.0/kde-modules/KDEMetaInfoPlatformCheck.cmake extra-cmake-modules-5.98.0/kde-modules/KDEMetaInfoPlatformCheck.cmake --- extra-cmake-modules-5.92.0/kde-modules/KDEMetaInfoPlatformCheck.cmake 1970-01-01 00:00:00.000000000 +0000 +++ extra-cmake-modules-5.98.0/kde-modules/KDEMetaInfoPlatformCheck.cmake 2022-08-27 09:14:28.000000000 +0000 @@ -0,0 +1,75 @@ +# SPDX-FileCopyrightText: 2022 Albert Astals Cid +# +# SPDX-License-Identifier: BSD-3-Clause + +#[=======================================================================[.rst: +KDEMetaInfoPlatformCheck +------------------------ + +By including this module there will be an automatic check between the supported +platforms listed in the metainfo.yaml file and the current platform +that is the target of the build + +If the current platform that is the target of the build is not supported +a CMake ``FATAL_ERROR`` will be issued + +The check can be ignored by setting ``KF_IGNORE_PLATFORM_CHECK`` to ``ON``. + +Since 5.93 +#]=======================================================================] + +option(KF_IGNORE_PLATFORM_CHECK "Ignore the supported platform check against metainfo.yaml" OFF) + +if (NOT "${KF_IGNORE_PLATFORM_CHECK}") + file(STRINGS metainfo.yaml MetaInfoContents) + set(_MetainfoParserInPlatforms false) + set(_MetainfoFoundSupportedPlatform false) + set(_MetainfoSupportedPlatforms "") + foreach(MetaInfoString IN LISTS MetaInfoContents) + if ("${MetaInfoString}" STREQUAL "platforms:") + set(_MetainfoParserInPlatforms true) + elseif(_MetainfoParserInPlatforms AND "${MetaInfoString}" MATCHES ".*name:[ \t\r\n]*(.*)") + list(APPEND _MetainfoSupportedPlatforms ${CMAKE_MATCH_1}) + if (${CMAKE_MATCH_1} STREQUAL "Linux") + if (CMAKE_SYSTEM_NAME MATCHES "Linux") + set(_MetainfoFoundSupportedPlatform true) + endif() + elseif (${CMAKE_MATCH_1} STREQUAL "FreeBSD") + if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + set(_MetainfoFoundSupportedPlatform true) + endif() + elseif (${CMAKE_MATCH_1} STREQUAL "OpenBSD") + if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD") + set(_MetainfoFoundSupportedPlatform true) + endif() + elseif (${CMAKE_MATCH_1} STREQUAL "Windows") + if (WIN32) + set(_MetainfoFoundSupportedPlatform true) + endif() + elseif (${CMAKE_MATCH_1} STREQUAL "macOS") + if (CMAKE_SYSTEM_NAME MATCHES "Darwin") + set(_MetainfoFoundSupportedPlatform true) + endif() + elseif (${CMAKE_MATCH_1} STREQUAL "Android") + if (ANDROID) + set(_MetainfoFoundSupportedPlatform true) + endif() + elseif (${CMAKE_MATCH_1} STREQUAL "iOS") + if (IOS) + set(_MetainfoFoundSupportedPlatform true) + endif() + elseif (${CMAKE_MATCH_1} STREQUAL "All") + set(_MetainfoFoundSupportedPlatform true) + else() + list(POP_BACK _MetainfoSupportedPlatforms) + message(WARNING "Found platform not recognized by the metainfo platform parser: ${CMAKE_MATCH_1}") + endif() + elseif("${MetaInfoString}" MATCHES "^[A-Za-z0-9_]+:") + set(_MetainfoParserInPlatforms false) + endif() + endforeach() + + if (NOT _MetainfoFoundSupportedPlatform) + message(FATAL_ERROR "Your current platform '${CMAKE_SYSTEM_NAME}' is not supported. The list of supported platorms is '${_MetainfoSupportedPlatforms}'.If you think this is a mistake or you are working on enabling the platform please build with the KF_IGNORE_PLATFORM_CHECK variable set to true") + endif() +endif() diff -Nru extra-cmake-modules-5.92.0/kde-modules/KDEPackageAppTemplates.cmake extra-cmake-modules-5.98.0/kde-modules/KDEPackageAppTemplates.cmake --- extra-cmake-modules-5.92.0/kde-modules/KDEPackageAppTemplates.cmake 2022-02-27 20:48:24.000000000 +0000 +++ extra-cmake-modules-5.98.0/kde-modules/KDEPackageAppTemplates.cmake 2022-08-27 09:14:28.000000000 +0000 @@ -23,11 +23,11 @@ kde_package_app_templates(TEMPLATES