aboutsummaryrefslogtreecommitdiff
path: root/modules/ECMGeneratePriFile.cmake
AgeCommit message (Collapse)Author
2022-02-13ECMGeneratePriFile: support multiple include install dirsFriedrich W. H. Kossebau
2021-05-25Clean ECM files after the minimum version changeChristophe Giboudeaux
- Remove deprecated version checks - Use VERSION_GREATER_EQUAL
2021-05-10ECMSetupVersion: phase out deprecated *_VERSION_STRING CMake variablesFriedrich 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-02-09Fix relative path edge case in ECMGeneratePriFileDaan De Meyer
When the qt install prefix and the qt host data path are the same, CMake's RELATIVE_PATH file path function will return the empty string. This made us accidentally set ECM_MKSPECS_INSTALL_DIR to /mkspecs/modules. Fix this by explicitly checking for the empty string. Once we can depend on CMake 3.20, we can use CMake's builtin function for joining paths instead.
2021-02-08Define relative paths when KDE_INSTALL_USE_QT_SYS_PATHS is enabledDaan De Meyer
When building multiple KDE projects, installing them to "$DESTDIR" and having cmake look for kde dependencies in "$DESTDIR" using "CMAKE_PREFIX_PATH=$DESTDIR/usr", we currently get failures when calling find_package() on projects that use KDE_INSTALL_QTPLUGINDIR, KDE_INSTALL_QTQMLDIR and KDE_INSTALL_QTQUICKIMPORTSDIR because these are defined as absolute paths when KDE_INSTALL_USE_QT_SYS_PATHS is enabled. This commit defines these paths relative to qmake's QT_INSTALL_PREFIX property instead when KDE is install to the same prefix as Qt. This fixes DESTDIR installations because with relative paths, CMake will search for these paths in "$DESTDIR" as well as "/". We limit this change to the scenario where the Qt and CMake install prefixes are the same because always doing this would break backwards compatibility as qml and plugins would be installed into CMAKE_INSTALL_PREFIX instead of QT_INSTALL_PREFIX after this change.
2020-06-14extra-cmake-modules: Convert to SPDX license statementsAndreas Cord-Landwehr
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-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
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
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
2016-08-31add full license textAllen Winter
REVIEW: 128780
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
2015-02-06Document when modules were added to ECM.Alex Merry
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-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-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-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-01-25This file provides the function ecm_generate_pri_file().David Faure
ECM_GENERATE_PRI_FILE() creates a .pri file for a library so that qmake-based apps can more easily use the library. It also sets ECM_MKSPECS_INSTALL_DIR as the directory to install the .pri file to. REVIEW: 115099