aboutsummaryrefslogtreecommitdiff
path: root/modules
AgeCommit message (Collapse)Author
2022-01-26Revert "ECMEnableSanitizers: do not enable linker flags when not supported"Bhushan Shah
This reverts commit abc3a698abc0dfea19040007a7c57d04c3bb6865. Unfortunately it caused various problems: - Minimum cmake version for extra-cmake-modules does not contain the required module - Even with newer cmake it had issue with old policy that was not fixed until very late that breaks packages using old policy CCMAIL: kde-frameworks-devel@kde.org
2022-01-25Fix ECMFindQmlModule unit test with Qt6Volker Krause
Finding Qt6 tools without also finding any library component only works in the COMPONENT form, see also MR !233. Fixes issue #7
2022-01-24Fix ECMPoQmTools when using Qt6Volker Krause
2022-01-23ECMEnableSanitizers: do not enable linker flags when not supportedBhushan Shah
If linker does not support the linker flag, do not enable it, on alpine e.g. musl does not support the ASAN, if it is enabled unconditionally, it will cause the linker to error out
2022-01-21ECMQmlModule: Add -Muri automoc option to make static builds work correctlyArjen Hiemstra
This is apparently needed for static QML plugins to work properly.
2022-01-21ECMQmlModule: Correct the prefix of the generated qrc to be what Qt expectsArjen Hiemstra
When the major version of a module is >1, Qt expects a .MajorVersion suffix on the module path. Since we are already doing this for the shared library install path, extract that code to a shared macro and reuse it for the prefix path in the generated qrc.
2022-01-21Set the right @since version for ECMQmlModuleArjen Hiemstra
2022-01-18Rename ECMQMLModules.cmake to ECMFindQmlModule.cmakeArjen Hiemstra
To avoid ambiguity with ECMQmlModule.cmake. To preserve backward compatibility, we keep a version around of ECMQMLModules.cmake that warns a user of it being moved and includes the new file.
2022-01-18Introduce ECMQmlModule.cmakeArjen Hiemstra
This contains some helper functions to make it easier to create QML modules through CMake. It takes care of several things that currently need to be done manually. It adds four tests for the four primary ways that it can be used, either as shared/static library and with or without C++ plugin.
2022-01-09Rename KDEDeprecationSettings to ECMDeprecationSettingsAlexander Lohnau
Semantically this is an ECM module, because it can be used to manage deprecated Qt API and from any project which use ecm_generate_export_headers
2021-12-27Add support for finding Qt6 QML modulesVolker Krause
2021-12-19Revert "Fix QT_PLUGIN_PATH for unittests"Ahmad Samir
As discussed in [1], it's simpler to put the files in builddir/bin/, i.e. no /plugins subdir, this makes it easier to run the unittest directly from the CLI/debugger/IDE, without relying on ctest exporting the correct QT_PLUGIN_PATH; instead QCoreApplication::libraryPaths() will pick up the plugins in e.g. builddir/bin/kf5/kio/ automatically. This will be followed by a change in KCoreAddons to remove the /plugins/ dir from the path in the builddir. [1] https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/213
2021-12-19Fix QT_PLUGIN_PATH for unittestsAhmad Samir
It was missing the "/plugins" suffix; found while building KIO with Qt6, where many unittests were failing with "couldn't create slave" for all slaves; the kio slaves are in builddir/bin/plugins/kf5/kio, and KPluginMetaData searches the directory "kf5/kio", and since it's a relative path, it assumes it's in the "plugins" dir. Keep the old behaviour for repos that put the plugins in builddir/bin/ directly without a "plugins" dir.
2021-12-01Include QtVersionOption before all Qt5 find_package callsVolker Krause
This doesn't make all these modules actually work with Qt6 yet, but it prevents them from unconditionally pulling in Qt5 in a Qt6 build. This is useful in order to even be able to pass a CMake run to the point one can port, test and debug the rest.
2021-11-30ECMGeneratePkgConfigFile: Add an URL parameterHeiko Becker
While porting a manual configure_file invocation for kactivities' .pc file to ecm_generate_pkgconfig_file I noticed that the URL keyword was missing afterwards.
2021-11-23Split KDEInstallDirs into a 5 and a 6 variantVolker Krause
This factors out large parts of the common code into separate modules, and adds a backward compatibility wrapper. The 6 variant drops some deprecated variables where possible, but otherwise is the same as the 5 variant. It still lacks a replacement for the paths depending on ECMQueryQMake though.
2021-11-18AddAppIcon: clarify ksvg2icns role for @2x iconsDawid Wrobel
The description was a bit misleading and may have suggested that ksvg2icons was required for @2x (Retina) icons to work.
2021-11-08Add support for specifying private dependencies for pkg-config filesIngo Klöcker
2021-10-04ECMFindQMLModule: Use QT_HOST_BINS to find qmlplugindumpAlex Richardson
When cross-compiling QT_INSTALL_BINS contains binaries for the target system that can't be used during the build. Instead use QT_HOST_BINS which contains the Qt build tools for the current system.
2021-10-02ecm_add_test: add -DQT_FORCE_ASSERTS to compile flags by defaultAlex Richardson
While debugging a failing test (KProcessTest in KCoreAddons), I noticed that the Q_ASSERT() statements inside that test weren't being executed because RelWithDebInfo builds default to passing -DQT_NO_DEBUG. With this change the test I was debugging now asserts early instead of failing a QCOMPARE later on.
2021-09-13Make sphinx happier about syntaxAlbert Astals Cid
And the generated html looks more correct
2021-09-01ECMSetupQtPluginMacroNames: avoid use of IN_LIST in generated codev5.86.0-rc1v5.86.0Friedrich W. H. Kossebau
NO_CHANGELOG
2021-09-01ECMSetupQtPluginMacroNames: avoid adding duplicates to vars in config codeFriedrich W. H. Kossebau
2021-08-15Add LicenseRef-KDE-Accepted-LGPL to license compatibility matrixNicolas Fella
KDE-Accepted-LGPL means LGPL3 plus maybe future version, so accept it everywhere LGPL3-only is accepted
2021-08-05[ecmcheckoutboundlicense] Ensure that last source file is always processedv5.85.0-rc1v5.85.0Nicolas Fella
Sometimes reuse spdx does not produce an empty line after the last FileName line and thus the file is never added to the dictionary
2021-08-05Simplify the PROJECT_VERSION regexChristophe Giboudeaux
CMake rejects the project version if it contains anything but dots and numbers, there's no need to try to catch anything else.
2021-08-05Handle case where zero must be keptChristophe Giboudeaux
This is required for the frameworks versions Amends: a0f8e54
2021-08-05ecm_setup_version: deal with 0-prefixed version values in PROJECT modeFriedrich W. H. Kossebau
5c191fa1d2383c69ddc075395e04f84b7679613a already added the same sanity check for the non-PROJECT mode
2021-08-04modules/ECMGenerateHeaders.cmake - avoid uninitialized warningAllen Winter
Check for EGH_REQUIRED_HEADERS definition before using. Avoids a CMake warning for unitialized values.
2021-07-13Fix typos found by codespellChristophe Giboudeaux
GIT_SILENT
2021-07-12Don't install logging categories files on AndroidVolker Krause
There is no KDebugSettings there, and thus those files just bloat the APK.
2021-06-07modules/ECMGenerateHeaders.cmake - init originalprefixAllen Winter
to make cmake --warn-uninitialized happy
2021-06-01Add LicenseRef-KDE-Accepted-GPL to license compatibility Matrixv5.83.0-rc1v5.83.0Nicolas Fella
LicenseRef-KDE-Accepted-GPL is GPL3 + later version accepted by KDE, so a file licensed only under this license is compatible with an outbound license of GPL-3.0-Only
2021-05-29ecm_qt_declare_logging_category: catch alias targets before failing internallyFriedrich W. H. Kossebau
target_sources() as used internally does not take alias targets.
2021-05-25Clean ECM files after the minimum version changeChristophe Giboudeaux
- Remove deprecated version checks - Use VERSION_GREATER_EQUAL
2021-05-21Add address sanitizer for MSVCFelix Weilbach
2021-05-21ecm_create_qm_loader: support target as alternative argumentFriedrich W. H. Kossebau
2021-05-17Find PkgConfig quietlyChristophe Giboudeaux
2021-05-15ECMAddAppIcon: support target as argumentFriedrich W. H. Kossebau
2021-05-10ECMSetupVersion: phase out deprecated *_VERSION_STRING CMake variablesFriedrich W. H. Kossebau
2021-05-07Order macro for attribute for symbol export before that for deprecatedFriedrich W. H. Kossebau
The symbol export/visibility attribute is not standardized so far and needs to be set by language extension attribute declaration at least with clang & MSVC, who both support that when it appears before the standard attribute declaration. NO_CHANGELOG
2021-04-25ECMGenerateExportHeader: unbreak builds by not mixing std & legacy attributesFriedrich W. H. Kossebau
NO_CHANGELOG BUG: 436155
2021-04-25ECMGenerateExportHeader: handle being included in C modeFriedrich W. H. Kossebau
NO_CHANGELOG
2021-04-25ECMGenerateExportHeader: check for non-vendor-specific deprecated attrFriedrich W. H. Kossebau
We want to know here if the standard attribute is available NO_CHANGELOG
2021-04-24Fix since version numbers for previous enumerator deprecation commitFriedrich W. H. Kossebau
NO_CHANGELOG
2021-04-24ECMGenerateExportHeader: add macros for enumerator deprecation warningFriedrich W. H. Kossebau
2021-04-23Modules docs: move rst docs into bracket commentsFriedrich W. H. Kossebau
CMake >= 3.0 supports bracket comments, and the reStructuredText integration code in sphinx/ext/ecm.py already supports extracting the docs from a bracket comment instead. Editing documentation without leading line comment markers is more simple, e,g. when reflowing text over lines. With ECM meanwhile requiring CMake 3.5 now it is possible to switch (and thus follow also the approach used by cmake itself). NO_CHANGELOG
2021-04-10Fix installation of qm files from po files in the build directoryVolker Krause
That's the case when using KDE_L10N_AUTO_TRANSLATIONS, and the code handles this case above when looking for the right po location already, but that result was accidentally discarded here.
2021-03-31ECMGenerateExportHeader: do sanity check for version argument valuesv5.81.0-rc2v5.81.0-rc1v5.81.0Friedrich W. H. Kossebau
To prevent accidental use of the C++-side hex number-style version variants on the cmake side where human-readable style is used instead (which can happen due to the similar names of the cmake variables/arguments and C++ macros which screws up developers' brain) we better do some proper input checks also on the arguments EXCLUDE_DEPRECATED_BEFORE_AND_AT and DEPRECATED_BASE_VERSION
2021-02-26Fix ECMCheckOutboundLicenseTest to find the FindReuseTool.cmake filev5.80.0-rc1v5.80.0Friedrich W. H. Kossebau