aboutsummaryrefslogtreecommitdiff
path: root/modules
AgeCommit message (Collapse)Author
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
2014-12-28Add COMPATIBILITY argument to ecm_setup_version().Alex Merry
Lots of libraries will want to use SameMajorVersion to make sure searching for version 1 of a library doesn't give you version 2, for example. We may want to add another, custom compatibility mode for KDE Frameworks-style versioning, where version x.90.z to x.99.z are alpha/beta releases for version (x+1). REVIEW: 121696
2014-12-07Fix ECMQueryQmake when Qt5Core is found.Alex Merry
81627ad86d3d7d5e5a7d130dfc746d5b1b58cbe7 broke the case where Qt5 qmake is not in the path or not called qmake-qt5, because it stopped using the location of qmake as provided by the Qt5Core CMake module when found.
2014-12-07Fix ECMQueryQmake when Qt5Core is missing.Alex Merry
The wrong syntax for set() was being used. This change also allows QMAKE_EXECUTABLE to be used to override the qmake path even when the Qt5Core CMake module is found.
2014-10-21If find_dependency() fails, so should the Config file it is inAlex Merry
REVIEW: 120655
2014-10-03Typov1.3.0-rc1v1.3.0Christophe Giboudeaux
GIT_SILENT
2014-09-12Fix calls to qmakev1.2.1Aleix Pol
We were keeping the \n after the path, and it would crash in some places. Strip the whitespaces in both ends. Reviewed by Rohan Garg
2014-09-11Fix fallout from recent ECM patchesAlex Merry
KDE modules cannot assume the normal ECM modules are in the CMake module path, and CMAKE_INSTALL_IMPORTS_INSTALL_DIR / QTQUICKIMPORTSDIR was not set correctly. Also, ECMQueryQmake.cmake used a deprecated CMake command (exec_program).
2014-09-11Make code coverage possible in any KDE projectAleix Pol
Introduces a BUILD_COVERAGE option from a ECMCoverageOption file so that projects can easily enable code coverage in their applications. Furthermore, KDECompilerSettings does include that by default, so all proper KDE projects have the option by default. REVIEW: 120118
2014-09-11Add compiler sanitizers supportMathieu Tarral
REVIEW: 119968
2014-09-10Introduce ECMGeneratePkgConfigFileAleix Pol
A new module has been introduced to generate pkgconfig files from cmake projects. REVIEW: 119798
2014-09-05Fixup a minor typo from the last commitRohan Garg
2014-09-03Fix ECM to use qmake instead of hardcoding plugin install dirsRohan Garg
Packagers and other interested folks should pass -DKDE_INSTALL_USE_QT_SYS_PATHS=ON when building in order to install various files to the same dir as the Qt5 install dirs. CCMAIL: kde-packagers@kde.org REVIEW: 119901
2014-07-14Don't search default paths when finding lconvert.Michael Palimaka
Otherwise, if lconvert exists in normal system paths (eg. /usr/bin) that one will be used instead of the one alongside Qt5::lrelease. This could cause Qt4 lconvert to be incorrectly used on some systems. REVIEW: 119198
2014-07-04Fix the doc.Christophe Giboudeaux
2014-07-02add breeze to module documentationJonathan Riddell
2014-07-01give a warning if using invalid (typically old KDE 3) categoriesv0.0.15-rc3v0.0.15-rc2v0.0.15-rc1Jonathan Riddell
2014-07-01add breeze icon theme to ECMInstallIcons, ack'ed by notmartJonathan Riddell
2014-06-21ECMAddTests: make NAME_PREFIX only apply to the test, not the targetAlex Merry
David Faure and Patrick Spendrin have convinced me that NAME_PREFIX should be informational only, and not be used to prevent clashes, since it makes things confusing when you run tests manually. This is a SIC change (although in practice only kio and kconfig should be affected, currently). REVIEW: 118768 CCMAIL: kde-frameworks-devel@kde.org CCMAIL: kde-buildsystem@kde.org
2014-05-26Skip non-directory files inside the po/ directoryAurélien Gâteau
REVIEW: 118216
2014-05-10Revert "use the NAME_PREFIX only for the test, not for the executable"Alex Merry
This reverts commits b90b64632f46e929f26ab9a4ee0033478febe0eb ba8600088b8838d5453dd0990ec595e904ec216e 554be62af6d0f01049985076b2445229bae41816 These were causing configure failures in frameworks that use ECMAddTests. CCMAIL: ps_ml@gmx.de CCMAIL: kde-frameworks-devel@kde.org
2014-05-10add in the correct location. sorry for the noisePatrick Spendrin
2014-05-10hotfixPatrick Spendrin
2014-05-09use the NAME_PREFIX only for the test, not for the executablePatrick Spendrin
2014-05-04Add ECMPoQmTools moduleAurélien Gâteau
ecm_create_qm_from_po_files() was actually not very useful in practice. So that is deprecated, to be removed before ECM 1.0. Instead, the ECMPoQmTools provides several useful functions: ecm_create_qm_loader() (which already existed in ECMCreateQmFromPoFiles), ecm_process_po_files_as_qm() (which has the same signature as gettext_process_po_files() from the FindGettext module) and ecm_install_po_files_as_qm(), which is a convenience function mostly for the benefit of KDE Frameworks (although potentially useful for whatever other projects have the unusual requirement of a Gettext translation workflow but no Gettext usage in the code). NB: some clean-up to the documentation was done by Alex Merry <alex.merry@kde.org> as part of this commit. REVIEW: 117823
2014-05-03use different syntax to run the target in question instead of an executable ↵Patrick Spendrin
in the path
2014-04-25Fix ecm_setup_version() with CMake 2.8.12.xAlex Merry
cmake_policy() does not allow you to reference policies that do not yet exist, so include a version check.
2014-04-25Remove ECMDBusAddActivationService moduleAlex Merry
ecm_dbus_add_activation_service() requires suffient knowledge of its internals to use that replacing two lines with one seems silly. In order to use it you have to know it behaves like configure_file() (because you have to construct the file yourself), except that it also installs it somewhere (for which you have to make sure DBUS_SERVICES_INSTALL_DIR is defined before you use it, which is certainly not a given for non-KDE projects). By this point, why not just use configure_file() and install()? The DBUS_SERVICES_INSTALL_DIR provided by KDEInstallDirs is all the magic you actually need, and if that's explicit in the CMakeLists.txt file, it's a lot more obvious that you should have it defined somewhere. REVIEW: 117581
2014-04-25Add a stub for ECMFindModuleHelpers to the find-modules dirAlex Merry
ECMUseFindModules allows find modules to be copied to a local directory. These find modules may use ECMFindModuleHelpers, but they will not be in the same relative location to ECMFindModuleHelpers.cmake and there is no guarantee that ECMFindModulesHelpers.cmake will be in the CMake module path. To solve this, we make sure there is always a stub file in the same directory as the find modules that includes the real ECMFindModuleHelpers.cmake. The one installed with ECM just includes "../modules/ECMFindModuleHelpers.cmake", while ecm_use_find_modules generates a stub that uses an absolute path. REVIEW 117658
2014-04-25Make ecm_setup_version interact well with CMP0048Alex Merry
When CMake policy CMP0048 (CMake 3.0) is set to NEW, the project() command is meant to manage the project's version variables. We therefore do not set the PROJECT_VERSION variables in this case. To make sure projects do not have to specify their version in multiple places, this also allows the keyword "PROJECT" to be passed to ecm_setup_version instead of an actual version number. In this case, the version passed to project() will be used. REVIEW: 117619
2014-04-25New syntax for ecm_install_icons()Alex Merry
This requires the icon files to be specified (which is better than globbing, because the build system will then be able to tell when files are added or removed and re-run CMake). It also removes the theme name from the filename pattern: the old code used a shorthand theme name for a small number of themes, and didn't allow any other themes. Extending this to arbitrary themes could cause problems with themes that have numbers or hyphens (or whatever other delimiter character was used) in their names. Most users are likely to just want to install to a single theme anyway (based on a random sampling of users of kde4_install_icons), so that is what the new syntax requires. The old syntax still works and behaves as before. ecm_update_iconcache is renamed to _ecm_update_iconcache - it was never documented as public API anyway. REVIEW: 117617
2014-04-25ECMGeneratePriFile: Allow lib and include install dirs to be overriddenAlex Merry
Rather than blindly using ${LIB_INSTALL_DIR} and ${INCLUDE_INSTALL_DIR} (which assume the inclusion of KDEInstallDirs), this checks whether they exist, also checks for ${CMAKE_INSTALL_LIBDIR} and ${CMAKE_INSTALL_INCLUDEDIR} (set by GNUInstallDirs), provides hard-coded defaults and allows arguments to be used to override the values. This should make it useful to projects that aren't KDE Frameworks. REVIEW: 117593
2014-04-25ECMFindModuleHelpers: set traditional variablesAlex Merry
The traditional *_LIBRARIES, *_INCLUDE_DIRS and *_DEFINITIONS do have some uses - they make it easier to create package config files that use found libraries in their link interface. So this makes sure these variables are set by ecm_find_package_handle_library_components() (and hence by FindWayland.cmake and FindXCB.cmake). REVIEW: 117585
2014-04-23Only search for qttools if ECM_CREATE_QM_FROM_PO_FILES is called.Nicolás Alvarez
This means frameworks will only depend on qttools if you have a po directory when building them. Approved by agateau and alexmerry on IRC.
2014-04-22Improve plural handling for code using Qt translation systemAurélien Gâteau
- Always load "en" translation: This way if a plural string is not translated, we fallback to the correct english plural form. - Generate .ts files with correct plural settings REVIEW: 117629
2014-04-16Allow ecm_create_qm_loader() to be passed the _SRCS variableAlex Merry
This allows a more straightforward way of using it, which matches the macros that generate things like D-Bus interfaces. REVIEW: 117475
2014-04-16ECMCreateQmFromPoFiles: Also check CMAKE_INSTALL_LOCALEDIRAlex Merry
This is the variable set by GNUInstallDirs. REVIEW: 117596
2014-04-16Make ECMCreateQmFromPoFiles usable from within trunk/l10n-kf5Aurélien Gâteau
REVIEW: 117560
2014-04-11Add documentation generation using SphinxAlex Merry
This is deliberately modelled very closely on CMake's documentation system. It's a hefty patch, because it involved changing all the documentation to be in reStructuredText format. I also cleaned up the copyright/license statements at the same time. Note that the find modules contain the full license, due to the fact that ecm_use_find_module() copies them out of the ECM distribution.
2014-04-01Do not replace "-" with "_" in .po filesAurélien Gâteau
This causes problem with .po files whose name contains "-". A nice side effect of this approach is we pass a QLocale to QTranslator, which means it will try to load translations for all "ui languages" [1] instead of just the one returned by QLocale::name(). [1]: http://doc-snapshot.qt-project.org/qt5-stable/qlocale.html#uiLanguages REVIEW: 117296
2014-03-28Add ECMCreateQmFromPoFiles.cmakeAurélien Gâteau
Simplifies translation handling for frameworks using Qt translation system. REVIEW: 117052
2014-03-27Print module name for not found dependend componentMartin Gräßlin
Always printed Wayland. REVIEW: 117114
2014-03-17Create ECMFindModuleHelpers module for common find-module codeAlex Merry
This currently mostly contains macros for handling components; FindWayland and FindXCB are ported to use this module, which comes with various improvements for them. REVIEW: 116653
2014-03-02find_dependency: Update to match CMake's versionAlex Merry
Specifically, we namespace the variables to avoid conflicts, and make the version argument optional. REVIEW: 116080
2014-02-21Defer to CMake's find_dependency macro if it existsAlex Merry
This will be available in CMake 3.0.0. This way, we automatically pick up any new features from it. REVIEW: 115775
2014-02-19Remove CMakePackageConfigHelpers.cmakeAlex Merry
All the frameworks are ported now, so this is no longer necessary. Checked by building everything with kdesrc-build.
2014-02-18Simplify argument parsing for ecm_generate_headersAlex Merry
Now that we no longer have to support the old syntax, some of the more complex bits of the argument parsing can be removed. REVIEW: 115869
2014-02-18Rename CMakePackageConfigHelpers to ECMPackageConfigHelpersAlex Merry
Overriding a CMake package like this will just cause all sorts of headaches later on. In this particular case, projects that depended on CMake 2.8.13 or later (more likely 3.0.0) would fail with a message about removing the CMakePackageConfigHelpers file, but would have no way to do that while still using ECM. This also renames the configure_package_config_file() macro to ecm_configure_package_config_file(), so that anything including CMakePackageConfigHelpers afterwards does not overwrite the macro unexpectedly. For now, we keep a CMakePackageConfigHelpers.cmake file that just wraps ecm_configure_package_config_file() as configure_package_config_file() to keep the frameworks building while they are ported. REVIEW: 115496 Reviewed by Sune Vuorela <kde@pusling.com>