aboutsummaryrefslogtreecommitdiff
path: root/modules
AgeCommit message (Collapse)Author
2020-08-30Strip leading zeros from numerical version numbers in C++ codev5.74.0-rc1v5.74.0Volker Krause
Our August releases produce invalid octal numbers ("08") otherwise.
2020-08-29Add timeout for qmlplugindump callsNicolas Fella
qmlplugindump sometimes hangs forever and thus blocks a build. Setting an (arguably arbitrary) timeout works around that.
2020-07-10Fix reST list from not being a listivan tkachenko
2020-07-10Revert "Fix markdown list from not being a list"ivan tkachenko
This reverts commit 3830dde78f9bde7ebe01fddca49d5806d4e52bea.
2020-07-10fix license headersHenri Chain
2020-07-10Add ecm_generate_dbus_service_fileHenri Chain
Summary: It serves as a replacement for `kdbusaddons_generate_dbus_service_file`. An application can be a DBus-activated service just fine without using KDBusAddons. Moreover, this new module uses named arguments for future-proofing, and adds support for specifying a `SystemdService`. It also cleans up the confusion on what the "path" is about: Rather than requiring to specify executable and path separately, we just extract the executable file name on Windows, if necessary. Usage: ``` ecm_generate_dbus_service_file(NAME org.kde.kded5 EXECUTABLE ${KDE_INSTALL_FULL_BINDIR}/kded5 SYSTEMD_SERVICE plasma-kded) ``` Test Plan: * Was able to generate a kded service file * Was able to generate a kded service file with `SystemdUnit` * Verified that it moaned when executable wasn't an absolute path * Untested on Windwos Reviewers: #frameworks, davidedmundson, kossebau, kfunk, habacker Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D29051
2020-07-10Introduce function ecm_install_configured_fileDavid Edmundson
Summary: This, as the name suggests, configures a file and installs it. It's not very complicated but it's a repeated pattern in plasma that gets quite messy dealing with temporary files. Test Plan: Used in a project Reviewers: #build_system Subscribers: apol, kossebau, pino, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D28355
2020-07-01Fix Sphinx warning about cmake code blockv5.72.0-rc1v5.72.0ivan tkachenko
Lexer for CMake could not parse this broken grammar, because it is ".cmake.in", not just ".cmake". CMake itself solves this problems by declaring such code blocks as generic "::" blocks instead. For example, take a look at the last code block at CMakePackageConfigHelpers help page: - https://cmake.org/cmake/help/v3.18/module/CMakePackageConfigHelpers.html#example-generating-package-files - https://github.com/Kitware/CMake/blob/0464298956a204578aa8421ca0b84c089a97e0aa/Modules/CMakePackageConfigHelpers.cmake#L208
2020-06-24Remove support for png2icoHannah von Reth
Png2Ico provides lower quality icons compared to icoutils as png2ico predates the current icon standard. Still lloking for png2ico prints * Png2Ico, Executable that converts a collection of PNG files into a Windows icon file, <https://www.winterdrache.de/freeware/png2ico/ or https://commits.kde.org/kdewin> which confuses new users.
2020-06-23Fix markdown list from not being a listivan tkachenko
2020-06-14extra-cmake-modules: Convert to SPDX license statementsAndreas Cord-Landwehr
2020-05-13ECMGenerateExportHeader: add generation of *_DEPRECATED_VERSION_BELATED()Friedrich W. H. Kossebau
Summary: Now and then tagging some API as deprecated for the compiler is forgotten. Doing this retractivitly in newer versions but using the official version might break build setups configured to only show warnings up to a certain version and otherwise fail a build, using -Werror=deprecated-declarations. To allow retroactive tagging of API for compiler warnings, and showing the official version in the warniung message, while reacting only to warning controls for the current version where the tag is added, avoids any such annoying experiences, without wrong version info at the same time. Reviewers: #frameworks, #build_system, dfaure Reviewed By: dfaure Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D29573
2020-05-08ECMGeneratePriFile: fix for ECM_MKSPECS_INSTALL_DIR being absoluteDavid Faure
Test Plan: works as before for the case where it's relative. Reviewers: cgiboudeaux, vatra, kfunk, apol, vkrause Reviewed By: cgiboudeaux Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D29524
2020-05-08ECMGeneratePriFile: make the pri files relocatableDavid Faure
Summary: Instead of generating QT.KArchive.includes = /full/path/include/KF5/KArchive make it QT.KArchive.includes = $$PWD/../../include/KF5/KArchive This makes the whole install prefix relocatable after the fact, the includes will be found based on where the .pri file ended up. This is especially useful for Conan support, says Bogdan. Test Plan: After make install in ECM, cd karchive/examples/helloworld && qmake && make Reviewers: vatra, kfunk, apol, vkrause Reviewed By: vkrause Subscribers: ablu, kossebau, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D29274
2020-05-04Suppress find_package_handle_standard_args package name mismatch warning.Weng Xuetian
Summary: cmake introduced a new find_package mismatch check in 3.17, but also allows user to suppress the warning by setting a variable (Or parameter, but require new cmake 3.17). Same technique is also used with in cmake, e.g. FindGTK2.cmake. Test Plan: Test with FindXCB.cmake Reviewers: #frameworks, #build_system, apol Reviewed By: apol Subscribers: apol, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D29396
2020-04-26ECMAddQch: fix use of quotation marks with PREDEFINED in doxygen configFriedrich W. H. Kossebau
2020-04-19ECMAddQch: help doxygen to handle Q_DECLARE_FLAGS, so such types get docsFriedrich W. H. Kossebau
2020-02-26Load QM files from assets: URLs on AndroidVolker Krause
Summary: This works with both the old and the new way of Qt's asset deployment, ie. with Qt 5.13 and Qt 5.14. Reviewers: apol Reviewed By: apol Subscribers: apol, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Maniphest Tasks: T12520 Differential Revision: https://phabricator.kde.org/D27596
2020-02-12ECMQtDeclareLoggingCategory: gently deal with no categories exportedFriedrich W. H. Kossebau
With some build configurations no catgories might be registered for a given export id. Instead of failing hard and thus forcing to catch this situation explicitly on the caller side, be grateful on the callee side and just generate an empty file, so the installed file set is consistent. GIT_SILENT
2020-02-11ECMQtDeclareLoggingCategory: use older NAME_WE with get_filename_componentFriedrich W. H. Kossebau
NAME_WLE might be more nice to support any people who might want to use a dot in the base filename, but that needs newer cmake. GIT_SILENT
2020-02-11Add ecm_qt_install_logging_categories & ecm_qt_export_logging_categoryFriedrich W. H. Kossebau
Summary: Having to manually maintain a separate copy of all the data about qt logging categories in the categories files comes with the usual disadvantages. The new macro ecm_qt_install_logging_categories together with the additions of arguments DESCRIPTION & EXPORT to ecm_qt_declare_logging_category allows to have just one place with one copy of the data, and have the categories file automatically generated from that data, linked via the EXPORT id. For cases not using ecm_qt_declare_logging_category, but having categories manually defined in code, yet wanting to have info about those categories in the installed fiel, ecm_qt_export_logging_category allows to add those data to the system. Test Plan: Added unit tests work, porting of some repos created categories files whose diff against the manually created files were only the DO_NOT_EDIT header. Reviewers: #build_system, #frameworks, broulik, mlaurent Reviewed By: mlaurent Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D27150
2020-02-08ECMGeneratePriFile: unbreak for usages with LIB_NAME not a target nameFriedrich W. H. Kossebau
2020-02-07ECMGeneratePriFile: Fix static configurationsKevin Funk
Summary: Populate module_config with staticlib. This is needed for Qt 5.12, as Makefiles contain the full path to the library instead of just the base name. QMake needs to be aware of the build type. This issue was found in KDStateMachineEditor's .pri files. Before this patch the linker tried to link against .so files even for static libraries. Note: Probably not very relevenat to KDE Frameworks (since it's all about shared libraries, but I'd like to keep the original ECMGeneratePriFile version up-to-date) Compare: ``` % cat kdsme-qmake-test.pro QT += KDSMEDebugInterfaceSource !qtHaveModule(KDSMEDebugInterfaceSource): warning("Library not found") SOURCES += main.cpp % qmake --version QMake version 3.1 Using Qt version 5.9.8 in /home/kfunk/devel/build/qt5.9/qtbase/lib % qmake . % make ... g++ -Wl,-rpath,/home/kfunk/devel/build/qt5.9/qtbase/lib ... -L.../lib -lkdstatemachineeditor_debuginterfacesource ... % make clean % env-qt5.12 % qmake --version QMake version 3.1 Using Qt version 5.12.5 in /home/kfunk/devel/build/qt5.12/qtbase/lib % qmake . % make ... g++ -Wl,-rpath,/home/kfunk/devel/build/qt5.12/qtbase/lib ... .../lib/libkdstatemachineeditor_debuginterfacesource.a ... Reviewers: dfaure, winterz, vkrause, apol Reviewed By: apol Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D26394
2020-01-26ECMAddAppIcon: Add sc in regex to extract extension from valid namesPatrick José Pereira
Summary: Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com> Reviewers: tcanabrava, apol Reviewed By: tcanabrava, apol Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D26751
2020-01-23ECMAddQch: support & document K_DOXYGEN macro usageFriedrich W. H. Kossebau
2019-12-05EBN extra-cmake-modules comments spelling cleanupJohn Hayes
Summary: Correct spelling in extra-cmake-modules comments. Reviewers: apol Reviewed By: apol Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D25752
2019-12-02ECMGenerateExportHeader: add NO_BUILD_SET_DEPRECATED_WARNINGS_SINCE flagFriedrich W. H. Kossebau
Summary: The original intention has been that by default during the build of a library no warnings should be emitted on using own deprecated API, as for one that has to be implemented as well as often deprecated API is implemented using other deprecated API, so the warnings are not helpful, and having to add lots of push/pop warnings instructions in the code for the compiler harms readability more than it helps ensuring to only use deprecated API where one has to. The original intention was satisfied due to the default mechanism in the generated export header code, where DEPRECATED_WARNINGS_SINCE if not set defaults to DISABLE_DEPRECATED_BEFORE_AND_AT. That though breaks once the group version of DEPRECATED_WARNINGS_SINCE is set in the build, as this default has higher priority by design, even if the usage here only wants to target dependency libs of the same group, not the current library. To restore the intented default behaviour, by default DEPRECATED_WARNINGS_SINCE is now explicitely set for the library build itself to the EXCLUDE_DEPRECATED_BEFORE_AND_AT value, and a new macro option allows to disable this. Reviewers: #build_system, #frameworks, dfaure Reviewed By: dfaure Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D25589
2019-10-30ECMGenerateExportHeader: allow ecm_[..]_format_version wo/ CURRENT_VERSIONv5.64.0-rc1v5.64.0Friedrich W. H. Kossebau
GIT_SILENT
2019-10-22ECMAddQch: in doxygen config template blank macros with =, not =""Friedrich W. H. Kossebau
GIT_SILENT
2019-10-22ECMAddQch: support PREDEFINED_MACROS/BLANK_MACROS with blanks & quotesFriedrich W. H. Kossebau
2019-10-22ECMGenerateExportHeader: fix deprecation text concatenation having quotesFriedrich W. H. Kossebau
GIT_SILENT
2019-10-16ECMGenerateExportHeader: generate code with C90-compatible commentsFriedrich W. H. Kossebau
GIT_SILENT
2019-10-11ECMGenerateExportHeader: adapt too small DEPRECATED_BASE_VERSION, not failFriedrich W. H. Kossebau
More friendly to users which mix arguments DEPRECATED_BASE_VERSION & EXCLUDE_DEPRECATED_BEFORE_AND_AT, but e.g. allow the latter to be configured during library build setup GIT_SILENT
2019-10-11ECMGenerateExportHeader: for DEPRECATED_BASE_VERSION support value CURRENTFriedrich W. H. Kossebau
GIT_SILENT
2019-10-11ECMGenerateExportHeader: use final hex numbers in generated codeFriedrich W. H. Kossebau
GIT_SILENT
2019-10-11ECMGenerateExportHeader: fix DEPRECATED_BASE_VERSION, value 0 and docsFriedrich W. H. Kossebau
GIT_SILENT
2019-10-10Add ECMGenerateExportHeader, for improved handling of deprecated APIFriedrich W. H. Kossebau
Summary: Generates additional macros in the export header which can be used for fine-grained disabling of warnings & visibility as well as excluding from the build. Reviewers: #frameworks, #build_system Subscribers: chehrlic, dfaure, cgiboudeaux, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D23789
2019-10-01new module ECMSourceVersionControlv5.63.0-rc2v5.63.0-rc1v5.63.0Harald Sitter
Summary: simply sets a variable when the source is under version control. use it to auto-enable Debug builds. there are also plans to switch special assertion logic on in KIO when used from git, so there definitely is a more generic use case of wanting to control behavior based on whether it the source is likely used to make a development or production build. conceivably the module could be used in the future to get git rev-parse or the like, hence the generic name. Test Plan: with .git the var is true, without it is false Reviewers: kde-buildsystem, dfaure Reviewed By: dfaure Subscribers: apol, kossebau, kde-frameworks-devel Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D24159
2019-09-18API dox: fix ":" to "::"Friedrich W. H. Kossebau
As intended by original code, to generate consistent output per this document for the given lists of variables GIT_SILENT
2019-09-15ECMAddQch: add INCLUDE_DIRS argumentFriedrich W. H. Kossebau
Summary: Allows to have headers be found by doxygen, e.g. to properly process preprocessor macros. Reviewers: #build_system, dfaure Reviewed By: dfaure Subscribers: dfaure, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D23791
2019-09-06ECMAddQtDesignerPlugin: pass code sample indirectly via variable name argv5.62.0-rc1v5.62.0Friedrich W. H. Kossebau
Summary: The initial API asked to have custom C++ code to be parsed as string arguments. As any ";" in such strings would be treated as list separators, the initial API as workaround required to encode those in the passed code text with "@SEMICOLON@". As alternative variant the approach from the GENERATE_EXPORT_HEADER() macro and its CUSTOM_CONTENT_FROM_VARIABLE is now used, where instead the name of the variable is passed, from which then the full code could be fetched and directly used. As API user one no longer can pass code snippets directly inline as argument, but no longer needs to use the awkward @SEMICOLON@. As ECMAddQtDesignerPlugin is not yet part of a released version, the API can be still changed. Reviewers: #frameworks, #build_system, vkrause Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D23725
2019-08-05Add ECMAddQtDesignerPluginFriedrich W. H. Kossebau
Summary: ECMAddQtDesignerPlugin provides two macros that can be used to replace the usage of the tool kgendesignerplugin from KDesignerPlugin. This allows to have ECM-using libraries to create Qt Designer plugins without the need for another separate tool. For that purpose option structure & defaults are inspired from that one, to allow simple porting. Main difference is that ECMAddQtDesignerPlugin expects the widget metadata definition to be done in CMake code, using a dedicated function, instead of in a ini-style separate ".widgets" file. Porting of ".widgets" files basically means: copy content into cmake, transform ini code into arguments to util method. Key names need a bit of adaption, current names are open for dicussion. Porting example: ``` [KActionSelector] IncludeFile=kactionselector.h ToolTip=A widget for selecting and arranging actions/objects Group=Views (KF5) ``` gets ``` ecm_qtdesignerplugin_widget(KActionSelector INCLUDE_FILE kactionselector.h TOOLTIP "A widget for selecting and arranging actions/objects" GROUP "Views (KF5)" ) ``` Reviewers: #build_system, #frameworks Subscribers: apol, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D22724
2019-03-31Re-enable the setting of QT_PLUGIN_PATH, without the strange backslash.v5.57.0-rc1v5.57.0David Faure
Let's see if purpose unittests still work on Windows (which was the reason this got commented out, kio_file wasn't found anymore). CCMAIL: bcooksley@kde.org, kfunk@kde.org
2019-03-05ECMGeneratePkgConfigFile: make all vars dependent on ${prefix}David Faure
Summary: Note that the first test had a comment "without optional arguments" so I removed the INCLUDE_INSTALL_DIR variable to test what happens by default. The other tests still pass an absolute path there (which is unusual in practice, and breaks the idea of using ${prefix}). Test Plan: `ctest -R PkgConfig` passes Reviewers: kossebau, apol, cgiboudeaux Reviewed By: apol Subscribers: kde-frameworks-devel, kde-buildsystem, fazevedo Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D19538
2019-03-04Fix harmless warnings when creating the doc.Christophe Giboudeaux
GIT_SILENT
2019-03-04ECMGeneratePkgConfigFile: add variables used by pkg_check_modulesDavid Faure
Summary: If we ever end up in a situation where the generated .pc file is actually used by cmake's pkg_check_modules, then we need the includedir and libdir variables; pkg_check_modules ignores the Makefile-like Libs and Cflags lines of the .pc file. Context: craft adds a cmake buildsystem for sqlite3, which is then found using pkgconfig in akonadi. Test Plan: Filipe Azevedo is doing all the testing, I'm just providing patches :) Reviewers: apol, fazevedo, cgiboudeaux Reviewed By: fazevedo, cgiboudeaux Subscribers: cgiboudeaux, fazevedo, kde-buildsystem, kde-frameworks-devel Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D19506
2019-02-11ECMGeneratePkgConfigFile API dox: fix "Since" for DESCRIPTION argFriedrich W. H. Kossebau
Summary: Also place "Since" next to both argument and argument description. Reviewers: cgiboudeaux Reviewed By: cgiboudeaux Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D18913
2019-01-14Fix qmake module generation for Qt 5.12.1Volker Krause
Summary: Patch by Eike Ziller from https://github.com/KDAB/GammaRay/pull/526 in response to Qt change https://codereview.qt-project.org/#/c/248684/. Reviewers: apol Reviewed By: apol Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D18243
2019-01-09Use more https in linksFriedrich W. H. Kossebau
2019-01-08ECMGenerateQmlTypes: fix api dox: title needs more --- markupFriedrich W. H. Kossebau