aboutsummaryrefslogtreecommitdiff
path: root/modules
AgeCommit message (Collapse)Author
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
2015-11-30Don't warn when SVG(Z) icons are provided with multiple sizes/level of detailJaroslaw Staniek
This technically works and is practiced, e.g. for some Breeze icons. Some SVG icons do not scale well down from 32 to 22 or up from 16 to 22. For such cases icons are typically specially crafted for 22 and 16, at least. Then there's no single icon that be marked as "sc". So warnings such as: CMake Warning at ..../ECMInstallIcons.cmake:272 (message): Fixed-size icon foo.svg is not PNG or MNG ... are misleading. This change adds SVG(Z) extensions to the list of allowed icons for specific sizes. REVIEW:126199
2015-11-30Make sure we load translations on the main thread.Alex Merry
Because the old implementation (accidentally) worked when you put the ecm_create_qm_loader call in a different CMakeLists.txt file to the target the file was added to, some projects did this. This won't work with build-time-generated files, though, like moc files. So we (ab)use QTimer events to make the loading happen on the main thread. BUG: 346188 REVIEW: 126000
2015-11-17Do not find XCB's XINPUT library by default.Alex Merry
The XINPUT library is unlikely to be available on many systems, including a lot of Linux distributions. This will warn developers in advance by (a) not searching for XINPUT unless it was explicitly requested, and (b) printing a warning if they do request it. REVIEW: 125935
2015-11-14Fix multiple calls to ecm_create_qm_loader.Alex Merry
Multiple ecm_create_qm_loader() with different catalog names would overwrite each other's generated files, causing the wrong catalog to be loaded at runtime for some targets. This puts the catalog name into the generated filename. Since the catalog name is the only difference between the generated files, this is sufficient to fix the runtime behaviour. REVIEW: 125999
2015-11-08Revert "Make sure we load translations on the main thread."Alex Merry
This broke the build for projects which used ecm_create_qm_loader in unusual ways. A better approach is coming, but won't be in e-c-m 5.16. This reverts commit 009c480413910e8c1a18f4d1420f4a517ea606e6. CCBUG: 346188 CCMAIL: release-team@kde.org CCMAIL: kde-buildsystem@kde.org
2015-11-04Warn instead of error if ecm_install_icons finds no icons.v5.16.0-rc1Alex Merry
The V1 syntax of ecm_install_icons searched for icons by globbing files with a particular naming pattern. If there were no such icons, this used to do nothing, but silently. Commit fb7b8eea7d accidentally made this an error. More sensible would be to make it a warning. BUG: 354610 REVIEW: 125931
2015-11-03Add BSD license to ECMQmLoader.cpp.in.Alex Merry
CCMAIL: kde-licensing@kde.org CCMAIL: agateau@kde.org
2015-11-03Make sure we load translations on the main thread.Alex Merry
BUG: 346188 REVIEW: 123726
2015-10-20Fix ECMInstallIconsTest.Alex Merry
ECMInstallIcons now updates the theme cache if gtk-update-icon-cache is available, producing files the test hadn't been expecting.. Updating the test revealed that the old-style ecm_install_icons call only updated the hicolor cache, and not any of the other themes. REVIEW: 125631
2015-10-03Update GTK icon cache when installing icons.v5.15.0-rc1v5.15.0Volker Krause
Despite the name, Qt is also using this, and it considerably speeds up icon lookup. REVIEW: 125192
2015-09-25ECMEnableSanitizers: The undefined sanitizer is supported by gcc 4.9Albert Astals Cid
2015-08-25add COMMON_HEADER option and multiple header functionalityv5.14.0-rc1v5.14.0Patrick Spendrin
This adds a new keyword COMMON_HEADER which generates a new header containing all other headers. Also it is possible now to have multiple dummy headers per header file. It is assumed that the first header is the existing one. REVIEW: 124847
2015-08-18Add macro to generate logging category declarations for Qt5.Alex Merry
This makes life a bit easier for developers who use the categorised logging in Qt5 in the common case - rather than creating two new files, and remembering to put in the #ifdef for the default verbosity settings in Qt 5.4, they can just add a couple of lines to their CMakeLists.txt. REVIEW: 124595
2015-06-23Improve error reporting of query_qmake macrov5.12.0-rc1v5.12.0Aleix Pol
In case it fails, offer an error message and the attempted call, to make sure we can react accordingly. Note that the proper error argument is FATAL_ERROR, not FATAL. REVIEW: 124106
2015-05-18Add arguments to ecm_add_tests for listing added tests.Alex Merry
This makes it convenient to make further modifications to the tests, such as setting properties on either the tests or the targets. CHANGELOG: New arguments for ecm_add_tests(). BUG: 345797 REVIEW: 123841
2015-05-18Rework ECMAddTests documentation to emphasis ecm_add_tests().Alex Merry
ecm_add_test is the less useful (and less used) version of the functions (because you really might as well just use add_executable() and add_test() manually in that case). REVIEW: 123841
2015-05-16Revert "Add PROPERTIES argument to ecm_add_test and ecm_add_tests."Alex Merry
This reverts commit 0c224194ea7f12eaed32af746fc9138537f1919c. Stephen Kelly pointed out that this is probably not the best approach to the problem, and runs counter to the direction KDE's CMake code has been going (splitting functions up and using CMake built-ins where possible). I have a better solution in mind, which I'll post a review for later. CCMAIL: kde-buildsystem@kde.org CCBUG: 345797
2015-05-13Add PROPERTIES argument to ecm_add_test and ecm_add_tests.Alex Merry
This is particularly useful with ecm_add_tests, where you may want to force a suite of tests to run in serial, or alter the timeout for multiple tests at once. BUG: 345797 REVIEW: 123722
2015-05-13Add unit tests for ECMAddTests module.Alex Merry
REVIEW: 123722
2015-04-09Do not call lrelease with -compressLasse Liehu
According to Oswald Buddenhagen "it doesn't buy much, and there are some long-standing issues with it". Qt bug report: https://bugreports.qt.io/browse/QTBUG-44362 REVIEW: 122501
2015-03-15Warn about icon filenames with leading characters.Alex Merry
Through a quirk of implementation, old-style icon filenames are accepted by the new-style ecm_install_icons function. It's too late to change it now, as that would break existing projects, but we can warn about it. REVIEW: 122941
2015-03-06Use lconvert path from Qt cmake config when on Qt >= 5.3.1v1.8.0-rc1v1.8.0Dmitry Shachnev
Qt5LinguistToolsConfig.cmake defines CMake target for lconvert since Qt 5.3.1, so we should use that if it is available. Our own hacks were not working in some configurations (i.e. when there is /usr/bin/lconvert managed by qtchooser, but no qtchooser configuration file). REVIEW: 122626
2015-02-28Improve ECMPackageConfigHelpers documentation.Alex Merry
In particular, strongly recommend looking at the equivalent CMake documentation with regard to PATH_VARS, as a lot of projects that should be making use of it are not.
2015-02-15Extend ecm_generate_headers macro to also support CamelCase.h headersFriedrich W. H. Kossebau
REVIEW: 122317 Thanks alexmerry and dvratil for review
2015-02-06Minor: Cleanupv1.7.0-rc1v1.7.0Kevin Funk
2015-02-06Add missing documentation.Alex Merry
Three modules (ECMCoverageOption, ECMEnableSanitizers and ECMGeneratePkgConfigFile) were not being documented. This commit fixes that situation.
2015-02-06Document when modules were added to ECM.Alex Merry
2015-02-04Add a module to provide an uninstall target.Alex Merry
This is basically just the code available on the CMake FAQ item about `make uninstall`, but packaged up in a convenient module. REVIEW: 122359
2015-02-01Minor documentation syntax fixes.Alex Merry
2015-01-24Revert "Add SameMajorVersionWithPreleases compat option to ecm_setup_version."Alex Merry
This reverts commit 959c374c022394a116e8ceb2b1fce2df11752068. I merged and pushed the wrong branch.
2015-01-24Add SameMajorVersionWithPreleases compat option to ecm_setup_version.Alex Merry
SameMajorVersionWithPreleases is intended implement the versioning scheme followed by many KDE projects: minor releases after some high number (eg: 90) are considered to be pre-releases of the next major version, and are not compatible with the current major version. This allows alpha and beta releases to be ordered correctly by version-number-aware software like package managers (an alpha of version 2 should have a higher number than any release of version 1, but less than version 2.0). So a request for version 2.1.0 of a piece of software should not be satisfied by 2.93.4, because that is actually a pre-release of version 3. On the other hand, a request for version 2.91.0 should be satisfied by version 3.1.0. Note that prereleases are not considered unless explicitly requested, so 2.93.4 will not satisfy requests for version 3 (or version 2) of a piece of software.
2015-01-24Add ecm_add_app_icon function.Alex Merry
This adds an application icon to an executable from PNG files for Windows and Mac OS X. Unlike the similar kde4_add_app_icon macro from kdelibs, this requires icons to be explicitly listed as arguments (meaning CMake can tell when ones are added or deleted and reconfigure as appropriate), and it works with Matthias Benkmann's png2ico tool, as well as the KDE-Win tool of the same name. Currently missing unit tests. Also completely untested (except that `make test` runs on Linux, so there are no obvious syntax errors). With thanks to Ralf Habacker for the inital work on porting kde4_add_app_icon. CHANGELOG: Add ECMAddAppIcon module to add icons to executable targets on Windows and Mac OS X.
2015-01-14Fix CMP0053 warning with CMake 3.1.Alex Merry
With CMake 3.1, @-style variable expansion is deprecated outside of configure_file() or string(CONFIGURE) contexts (CMP0053). This causes ecm_generate_pri_file() to produce dev warnings with this verison of CMake, and would break this function in projects that set CMake 3.1 as their required version. REVIEW: 121971
2014-12-28Fix formatting in ECMSetupVersion.cmake.Alex Merry