aboutsummaryrefslogtreecommitdiff
path: root/modules
AgeCommit message (Collapse)Author
2018-02-03ecm_install_icons: refer to non-deprecated KDE_INSTALL_ICONDIRv5.43.0-rc1v5.43.0Friedrich W. H. Kossebau
2018-01-31Make sure to search for Qt5-based qmlplugindumpAndreas Sturmlechner
Summary: Without any hint, qmlplugindump version is whatever default is set by qtchooser. Test Plan: ecm_find_qmlmodule now works properly for e.g. kirigami. Reviewers: apol, cgiboudeaux Reviewed By: cgiboudeaux Subscribers: aacid, dfaure, cgiboudeaux, #frameworks, #build_system Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D9116
2018-01-17Fall back to language name for translations lookup if locale name failsWolfgang Bauer
For locales like de_AT, the current code only looks in share/locale/de_AT/ and share/locale/de-AT/ for translation catalogs, but not in share/locale/de/ where they most likely are. That's because bcp47Name() returns "de-AT" for de_AT (though in the case of de_DE e.g. it does return "de"). This patch additionally tries to fall back to the general language by taking the part of the locale name before the first '_'. Differential Revision: https://phabricator.kde.org/D9793
2017-11-30Add the description tag to the generated pkgconfig filesv5.41.0-rc1v5.41.0Christophe Giboudeaux
Summary: pkgconfig complains when the .pc file doesn't have a description. eg: $ pkg-config Baloo Package 'Baloo' has no Description: field With this change, if the DESCRIPTION parameter is not used, ECM_GENERATE_PKGCONFIG_FILE will : - First look if there's a metainfo.yaml file and get the description from there - If the file doesn't exist, or if the description tag is empty or non-existent, create a description based on the LIB_NAME value Test Plan: Tests added & pass Reviewers: dfaure, apol Reviewed By: dfaure Subscribers: #frameworks, #build_system Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D9056
2017-11-24ecm_add_test: Use proper path sep on WindowsKevin Funk
Summary: We need to separate paths in environment variables with a semincolon (;) on Windows. Reviewers: dfaure Subscribers: #frameworks, #build_system Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D8979
2017-11-05ECMAddTests: set QT_PLUGIN_PATH so locally built plugins can be foundDavid Faure
Summary: This of course requires running the unittests via ctest rather than launching the executable directly. Test Plan: `ctest -V -R kurifiltertest` in kio, which prints QCoreApplication::libraryPaths() at the beginning of the test. With this commit, builddir/kio/bin is added at the front of the list, and the kurifilter plugins from kio's build are loaded. Reviewers: cgiboudeaux, kfunk Reviewed By: cgiboudeaux Subscribers: #frameworks, #build_system Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D8660
2017-08-10Revert "RFC: Make ECMAddTests respect BUILD_TESTING"Kevin Funk
This broke a lot of frameworks when built WITH BUILD_TESTING=OFF. I didn't notice before since kdesrc-build was appending BUILD_TESTING=TRUE thus re-enabling the tests for me... This reverts commit b99d2d2c5dedcaba9745dddc1dd7b8d4811babf1.
2017-08-10Revert "doc: Add 'Since' note"Kevin Funk
Needed to revert parent commit This reverts commit ebbef5afcaee863c62136b14dbd06a7a73cf769a.
2017-08-09Include a module for finding qml imports as runtime dependenciesAleix Pol
Summary: Allows to check if a module is available on the system and sets it as a runtime dependency. This is useful for projects so that they can specify their qml dependencies easily and packagers and developers get to see what's missing by looking at the cmake output. Reviewers: #build_system, #frameworks, sitter Reviewed By: sitter Subscribers: dfaure, aacid Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D7094
2017-08-09doc: Add 'Since' noteKevin Funk
2017-08-07RFC: Make ECMAddTests respect BUILD_TESTINGKevin Funk
Summary: Use-case: Make building unit tests optional, by just following the CMake BUILD_TESTING option. The usual approach to conditionally build tests is to do: ``` if (BUILD_TESTING) add_executable(TestOne TestOne.cpp) target_link_libraries(TestOne my_library) endif() ``` or: ``` if (BUILD_TESTING) add_subdirectory(tests) endif() ``` This patch just turns all calls to ecm_add_test(...) into no-ops if BUILD_TESTING=OFF. See: https://cmake.org/cmake/help/v3.6/module/CTest.html Reviewers: vkrause Reviewed By: vkrause Subscribers: kossebau, vkrause, elvisangelaccio, asturmlechner, apol, #frameworks, #build_system Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D7187
2017-07-29Fix usage of query_qmake: differ between calls expecting qmake or notFriedrich W. H. Kossebau
Summary: when KDE_INSTALL_USE_QT_SYS_PATHS has been explicitely set, qmake can be considered a required dependency, otherwise the paths will not be known, which would be unexpected. Also does the code calling query_qmake, besides the one testing for the same install prefix, not handle the case of empty strings being returned and then results in bogus behaviour. Thus this patch makes code fail hard if query_qmake is expected to yield a result, but no qmake executable is found. Reviewers: #frameworks, ltoscano, rdieter, apol Reviewed By: apol Subscribers: #build_system Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D6772
2017-06-17ECMAddQch: fail hard if needed tools are not present, to avoid surprisesFriedrich W. H. Kossebau
2017-06-17Drop perl as dep for ecm_add_qch, not needed/usedFriedrich W. H. Kossebau
Cmp. https://bugzilla.gnome.org/show_bug.cgi?id=783759
2017-06-05New: ECMAddQch, for generating qch & doxygen tag filesFriedrich W. H. Kossebau
Summary: Enables generation of QCH files during a normal build, for documenting the public API of a library. These macros are especially done with release builds in mind, so distributed packages (like from Linux distributions) can include QCH files matching the version of the library and will be also automatically updated on new versions of the libary. Next to that these macros also support linking between different QCH files, so a subclass from another library for which there also is a QCH file installed will be linked to the entry in that other QCH file. This inter-QCH linking is especially useful for libraries extending Qt, where many of the used types are from Qt libraries. The macros come with the needed information for Qt libraries prepared, so the used Qt libraries just need to be listed in the LINK_QCHS argument by target names, like Qt5Core_QCH or Qt5Widgets_QCH. This should be a nice supplement to online services like api.kde.org, like Qt's own QCH files are to doc.qt.io, While QCH files from an abstract POV could be seen similar to code libraries, being components with links to lookup symbols/entries in other QCH files, so the rules and code should be done with similar concepts, currently CMake's target system seems bound to executable code creation. So things like "file(EXPORT ...)" could sadly not be reused, as custom targets are not supported with that. Thus a custom macro had to be created for now. Also could I not find a way to use namespaces like KF5::, for more consistent target naming. The patch also adds two variables to KDEInstallDirs.cmake for controlling where the QCH (and respective doxygen tag files) are installed. The QTQCHDIR variant allows to install QCH files for Qt-extending libraries into the same folder where Qt's own QCH files are, so Qt Assistant & other QCH viewer pick up them automatically to add them to the default help file collection. The QCHDIR variant would provide a neutral, but central installation location. Neutral, as it never "pollutes" the Qt system dirs with files possibly unrelated to Qt-based development (e.g. when simply using qthelp tools for documentation), and central, to help with finding available QCH files for manually adding/loading them into a viewer, given there is no official way currently to register the availability of QCH files on installing. Open questions: a) target system for exporting/importing done in a sane way? Better name pattern for the QCH targets than xxx_QCH (see the targets created for Qt, like Qt5Core_QCH)? b) sharing metadata with kapidox Initially I placed these macros into the kapidox module, as this seems the logic place. And would match what kdoctools does for user manuals. Just, that would create a build dependency on kapidox which complicates usage a little. Having these macros in ECM delivers them with no extra effort needed. The data in metainfo.yaml is partially duplicated with the data feed into the macros. How to deduplicate that is still open. Especially with the need to not depend on external data sources like identify.kde.org. Issues: * doxygen versions before 1.8.13 are broken and miss to include some files with generated QCH (https://bugzilla.gnome.org/show_bug.cgi?id=773693) * Qt Assistant often only built with QTextBrowser, while doxygen uses lots of HTML5 (incl. hardcoded JavaScript) (https://bugzilla.gnome.org/show_bug.cgi?id=773715), needs e.g. distributions to use QtWebKit to work, upcoming Qt versions might soon also have QtWebEngine based help viewer (https://codereview.qt-project.org/#/c/111559/) * inter-QCH links do not work in KDevelop currently (see https://bugs.kde.org/show_bug.cgi?id=372747) if installed as separate QCH files More details/background info at https://frinring.wordpress.com/2016/09/27/adding-api-dox-generation-to-the-build-by-cmake-macros/ Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D2854
2017-05-23ecm_qt_declare_logging_category(): more unique include guard for headerFriedrich W. H. Kossebau
Summary: The old guard was created just from the identifier + _H, which runs the chance to clash in projects which use an identifier matching the project name and which also have a class or central file header which is named by the project and then has an include guard matching the filename. Example: project ABC -> abc.h with ABC_H guard identifier ABC, header debug.h -> debug.h with ABC_H guard any.cpp including both abc.h and debug.h will see only one content Using both the header file name and identifier for the guard name and prefixing it additionally with a macro specific term should make the guard both follow the usual pattern for guards matching the file name and also add some namespacing to allow for similar named header files in bigger projects (e.g. "debug.h") which could be included in the same include tree. Reviewers: #frameworks, #build_system Subscribers: elvisangelaccio Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D5866
2017-05-16Add or improve "Generated. Don't edit" messages and make consistentFriedrich W. H. Kossebau
Reviewers: #frameworks, #build_system, apol Reviewed By: apol Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D5867
2017-05-08Change default pkgconfig install path for FreeBSDTobias C. Berner
Summary: FreeBSD, opposed to most other sytems, does not install pkgconfig files to lib/pkgconfig, but to libdata/pkgconfig. Reviewers: #freebsd, apol, kfunk Reviewed By: kfunk Subscribers: kfunk, #frameworks, #build_system Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D5766
2017-04-21Sanitizers: Don't use GCC-like flags for e.g. MSVCKevin Funk
Summary: Fixes compiler warnings such as: ``` cl : Command line warning D9002 : ignoring unknown option '-fsanitize=address' cl : Command line warning D9002 : ignoring unknown option '-fno-omit-frame-pointer' ``` Reviewers: aacid, bcooksley Reviewed By: aacid, bcooksley Subscribers: #frameworks, #build_system Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D5489
2017-04-20fix documentation, ecm_install_po_files_as_qm generates .qm, not .moHarald Sitter
2017-04-18Fix minor CMake warning (CMP0054)Kevin Funk
2017-04-11Don't include tests together with modulesAleix Pol
We have tests that go through the modules directory
2017-04-11Allow test to work with older versions of qmlplugindumpAleix Pol
2017-04-10Don't enable the test by defaultAleix Pol
The build isn't always reproducible and comparisons are unfair
2017-04-10Support older qmlplugindump versionsAleix Pol
2017-04-10Introduce ecm_generate_qmltypesAleix Pol
Summary: Introduces a function that allows to generate plugins.qmltypes files for our qml plugins using qmlplugindump much like Qt does. Test Plan: Introduced it locally on Purpose and it works Reviewers: #frameworks, #build_system Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D5087
2017-03-11Fix ecm_generate_pkgconfig_file compatibility with new cmakeWeng Xuetian
Summary: CMP0053 specifies that: - Expansion of ``@VAR@`` reference syntax defined by the ``configure_file()`` and ``string(CONFIGURE)`` commands is no longer performed in other contexts. replace it with the $ variable syntax. Test Plan: manual Reviewers: #frameworks, dfaure Reviewed By: dfaure Subscribers: #build_system Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D5017
2017-01-10ecm_add_app_icon : ignore SVG files silently when unsupportedR.J.V. Bertin
SVG files that fail to convert will still trigger a warning.
2017-01-10Update the ecm_add_app_icon documentationR.J.V. Bertin
Inform the user that SVG icons can now be provided in the macro call; on Mac the first that converts to .icns (if ksvg2icns is available) will provide the application icon. Other SVG files are ignored, idem on other platforms.
2017-01-09ecm_add_app_icon/Mac: accept SVG icons when KIconThemes is installedR.J.V. Bertin
KIconThemes comes with a ksvg2icns utility that converts .sgv and .sgvz files to native .icns icon files. Using this utility allows to create icons with optimum resolution regardless of the available .png images and of limitations of the host's iconutil application (limited to 256x256 on some Mac OS versions). REVIEW: 128162
2016-12-30Add Clang Sanitizer CMAKE_C_FLAGS for C projectLeslie Zhai
Test plan: Clang and GCC for simple C project, kcoreaddons, kjs, etc. BUG: 374195 REVIEW: 129708 Reviewers: #extracmakemodules, alexmerry Reviewed By: dfaure, aacid
2016-12-28Revert "Add Clang Sanitizer CMAKE_C_FLAGS for C project"Albert Astals Cid
This reverts commit 1e7f3d5ba91e79a47d69a48e8f991ee0e7794b53. It's breaking compilation of anything that uses pthreads
2016-12-28Add Clang Sanitizer CMAKE_C_FLAGS for C projectLeslie Zhai
BUG: 374195 REVIEW: 129708 Reviewers: #extracmakemodules, alexmerry Reviewed By: dfaure
2016-12-01Fix typoElvis Angelaccio
GIT_SILENT
2016-11-18Minor: Remove extra new lineKevin Funk
Triggered my OCD
2016-11-05Add ecm_win_resolve_symlinks module.Gleb Popov
REVIEW: 128112
2016-09-05ecm_process_po_files_as_qm: Skip fuzzy translationsAlexander Potashev
REVIEW: 128823
2016-09-02The default level for logging categories should be Info rather than Warning.David Faure
The whole point of Info is to be used by apps who want to print out some info for the user, not disabled by default. Example use case: ksmserver could output the name of the autostart files it's starting, so user can check their own scripts are started, and associate any errors with the corresponding script. In other words: Debug = debugging for the developer Info = debugging for the user :-) This commit shows the benefit of having a central place for changing this (many category definitions do not use this macro though) REVIEW: 128232
2016-08-31add full license textAllen Winter
REVIEW: 128780
2016-07-27Fix inclusion when there's no Qt5v5.25.0-rc1v5.25.0Aleix Pol
ECMQueryQmake will fail as it's designed to only work with Qt5. We don't want to terminate the execution there, just to spit a warning and leave. If we suggest qmake-qt5 as a command, we'll end up performing the call anyway. This will fix the ExecuteCoreModules test under latest-qt4 build.
2016-07-26Add a fallback method for query_qmake() when there's no Qt5 installationAleix Pol
Addresses its usage on systems where Qt5 isn't installed, it allows for modules using it to decide what they should do. REVIEW: 128488
2016-07-18Make sure ECMGeneratePriFile.cmake behaves like the rest of ECMAleix Pol
In KDEInstallDirs we have some code to make sure that qmake is asked when the project shares the prefix with the installed Qt, to make sure that if something was changed in the distribution it would reflect on the projects. Make sure PRI files are installed using the same reasoning. REVIEW: 128427
2016-04-03ecm_qt_declare_logging_category: improve error message when using without ↵David Faure
including If one subdir in the project includes this file, all others can use the function but they don't see the value of the variable, which leads to a strange error CMake Error at ECM/modules/ECMQtDeclareLoggingCategory.cmake:114 (configure_file): configure_file input location <srcdir> is a directory but a file was expected. Happened in KIO, with kio/gui doing include+function call, and then adding function call in kio/widgets. REVIEW: 127432
2016-03-29ECMEnableSanitizers: avoid linking runtime for Clangv5.21.0-rc2v5.21.0-rc1v5.21.0Peter Wu
Clang automatically adds its runtime library (librt) when given the -fsanitize options. Do not force the GCC runtime libraries (asan, tsan, lsan), this results in "Your application is linked against incompatible ASan runtimes." errors when using the library in an executable built using Clang. Acked by Mathieu Tarral REVIEW: 127513
2016-03-21Fix _ecm_update_iconcache to only update the install locationStephen Kelly
Use the CMAKE_INSTALL_PREFIX to ensure that only a file in the install location will be touched. Otherwise a user running make install as root would create root-owned files in the build directory. Use the cmake -E touch command to update the mtime of the directory. That command exists since late 2007, but this manual file creation workaround pre-dates that by a few months (kdelibs SVN revision 691973). There is no chance any calling code is already passing an absolute path here because later in the function it is already used together with a CMAKE_INSTALL_PREFIX. Inspired-by: REVIEW 127445
2016-03-20Revert "ECMQtDeclareLoggingCategory: Include <QDebug> with the generated file"Stephen Kelly
This reverts commit 1d4bc35cf9383177459544d6fcd9de35edf3e77d. QLoggingCategory has always included QDebug, so this has always been superfluous.
2016-01-31ECMAddAppIcon: Use absolute path when operating on icons.Gleb Popov
REVIEW: 126711
2016-01-13Use PATH_SUFFIXES in ecm_find_package_handle_library_components()Alex Richardson
This is required to find poppler without package config as all the headers are installed in a poppler subdirectory of the include directory
2015-12-21ECMQtDeclareLoggingCategory: Include <QDebug> with the generated fileMartin Klapetek
In order to use the logging categories created by ECM, the generated header file has to be included but then also #include <QDebug> must be added to make it usable at all for qCDebug/qCWarning stuff. So this puts the #include <QDebug> into the generated header file and thus allowing to include a single header for qCDebug/qCWarning instead of two. REVIEW: 126368
2015-12-18CMake: Cleanup: Strip text from endif/elseKevin Funk
REVIEW: 126414