aboutsummaryrefslogtreecommitdiff
path: root/kde-modules/KDEInstallDirs.cmake
AgeCommit message (Collapse)Author
2017-12-15Introduce INSTALL_PREFIX_SCRIPT to easily set up prefixesAleix Pol
Summary: If enabled it will install a prefix.sh script to the root of the prefix. This file will be useful to be able to easily set up a prefix to be used by integrating the environment variables it exports. Test Plan: ``` $ cat prefix.sh export PATH=/home/apol/devel/kde5/bin:$PATH export LD_LIBRARY_PATH=/home/apol/devel/kde5/lib64:$LD_LIBRARY_PATH export XDG_DATA_DIRS=/home/apol/devel/kde5/share:${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/} export XDG_CONFIG_DIRS=/home/apol/devel/kde5/etc/xdg:${XDG_CONFIG_DIRS:-/etc/xdg} export QT_PLUGIN_PATH=/home/apol/devel/kde5/lib64/plugins:$QT_PLUGIN_PATH export QML2_IMPORT_PATH=/home/apol/devel/kde5/lib64/qml:$QML2_IMPORT_PATH ``` Reviewers: #frameworks, sitter Reviewed By: sitter Subscribers: kfunk, bcooksley, ngraham, sitter, cgiboudeaux, #build_system Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D9299
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-07-20Add API dox for KDEInstallDirs' KDE_INSTALL_USE_QT_SYS_PATHSFriedrich W. H. Kossebau
Reviewers: #frameworks, apol Reviewed By: apol Subscribers: #build_system Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D6773
2017-07-15Fix incomplete default path noted in QTQCHDIR documentationFriedrich W. H. Kossebau
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
2016-08-31add full license textAllen Winter
REVIEW: 128780
2016-08-21trivial: Fix documentationMatthias Klumpp
2016-07-18Appstream data changed its preferred locationJonathan Riddell
Update preferred path of appstream data files to /usr/share/metainfo Requires modern versions of appstream metadata generators. FEATURE REVIEW: 128174
2016-06-14Use "${BIN_INSTALL_DIR}/data" for DATAROOTDIR on Windows.Hannah von Reth
Summary: Instead of using "share" use "${BIN_INSTALL_DIR}/data" on Windows, this is the location provided by QStandardPaths for GenericDataLocation on Windows. Reviewers: dfaure Reviewed By: dfaure Subscribers: kfunk Differential Revision: https://phabricator.kde.org/D1873
2016-04-22Revert "Update AppStream metadata path"Matthias Klumpp
Better wait a little until applying this change, since this might break assumptions, and we don't know yet if all distros are using a recent enough AppStream (Generator) release. This reverts commit 4b7a90bfe7a3e2eb3ae83c946c182a79fabc51e3.
2016-04-20Update AppStream metadata pathMatthias Klumpp
As per AppStream release 0.9.4
2016-04-07Enables KDE_INSTALL_USE_QT_SYS_PATHS if CMAKE_INSTALL_PREFIX Qt5 prefixAleix Pol
Make Qt and ECM-based projects use the same directory sctructure (i.e. where plugins are, libs, etc.) by default. Otherwise it creates a tiny mess that might be controlled but usually won't. In the end, otherwise, people need to keep adapting their systems with environment variables anyway. All distros end up setting always this setting as ON, as well as brave developers who don't have separate prefixes for Qt and KDE. REVIEW: 127169
2015-12-29Make the KAppTemplate CMake module globalv5.18.0-rc1v5.18.0Marco Martin
templates are very useful as teaching tool in order to make a minimal application that uses a certain framework. templates in the KAppTemplate repository will always get forgotten (plus kapptemplate is not really necessary as they work in kdevelop as well) An ideal situation would be frameworks having templates in their own repos with templates of barebone apps using the main framework features. In order to do that, the cmake stuff needed in order to correctly install a template needs to be ported to a place avaiable to all frameworks REVIEW:126185
2015-12-18CMake: Cleanup: Strip text from endif/elseKevin Funk
REVIEW: 126414
2015-02-06Document when modules were added to ECM.Alex Merry
2015-01-24Warn when mixing relative and absolute paths in KDEInstallDirs.Alex Merry
BUG: 341683 FIXED-IN: 1.7.0 REVIEW: 121999 CHANGELOG: KDEInstallDirs: warn about mixing relative and absolute installation paths on the command line
2015-01-13Stop lying in the KDEInstallDirs documentation.Alex Merry
2015-01-11Do not unset cache variables in KDEInstallDirs.Alex Merry
Cache variables such as CMAKE_INSTALL_BINDIR may be used by other modules included from parallel parts of the tree, so we should not touch them. We still override them in the runtime environment, but this will not interfere with parallel subtrees of the project. As part of this, the order of precedence of variables specified on the command line is changed, so that KDE_INSTALL_* is considered first (although it is still considered "undefined" in the documentation). This means that if you only specify CMAKE_INSTALL_BINDIR, that will be used by both KDEInstallDirs and GNUInstallDirs, but if you specify both that and KDE_INSTALL_BINDIR, KDEInstallDirs will use KDE_INSTALL_BINDIR instead. This is probably not too useful, but seems more useful than any other arrangement. BUG: 342717 REVIEW: 121982
2015-01-07fix typo that lead to nearly empty KDE_INSTALL_TARGETS_DEFAULT_ARGS var on macChristoph Cullmann
2014-12-28Fix include directory change spotted by Hrvoje Senjan.v1.6.0-rc1v1.6.0Alex Merry
A previous commit inadvertantly changed the KF5 include prefix to kf5 (uppercase to lowercase).
2014-12-28Add deprecation warnings for old-style variables.Alex Merry
REVIEW: 121646
2014-12-28Make KDEInstallDirs provide KDE_INSTALL_* variables.Alex Merry
Creating variables whose names start with CMAKE_ is a bad idea for modules distributed outside CMake itself. Since the module is called KDEInstallDirs, having a KDE_INSTALL_ prefix for the variables is clear and intuitive. Both CMAKE_INSTALL_* variables and the older KDELibs4-compatible variables are provided, unless KDE_INSTALL_DIRS_NO_DEPRECATED is set to TRUE before the module is included. Even then, the CMAKE_INSTALL_* variables provided by the GNUInstallDirs module will still be set and understood (for compatibility with that module), unless KDE_INSTALL_DIRS_NO_CMAKE_VARIABLES is set to TRUE. REVIEW: 121646
2014-11-07Set CMAKE_INSTALL_SYSCONFDIR to /etc when CMAKE_INSTALL_PREFIX is /usrAlex Merry
When installing to /usr, we should use /etc for configuration. Using /usr/etc does not make sense. REVIEW: 120246
2014-09-16allow qmldir to follow qt_sys_pathHarald Sitter
when running with the KDE_INSTALL_USE_QT_SYS_PATHS option allow QMLDIR in KDEInstallDirs to follow whatever is defined by qmake this change makes sure that qml plugins will end up in a default Qt path when using the super special magic flag.
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-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-19Check the libdir also on kFreeBSD and HurdPino Toscano
This way, on the Debian versions of these OSes, the library directory can be a multiarch path.
2014-07-18Define variable for AppStream upstream XML directoryMatthias Klumpp
REVIEW:118020
2014-07-07Define convenience variable for DATAROOTDIR/kxmlgui5.David Faure
See RR 119142 for more details.
2014-05-14Do not fail if vars like CMAKE_INSTALL_LIBDIR are defined as normal varsAurélien Gâteau
REVIEW: 118127
2014-05-13Use CMAKE_INSTALL_FOODIR style variables for KDEInstallDirsAlex Merry
This matches how CMake's GNUInstallDirs does things. REVIEW: 118057
2014-05-12Check that KDEInstallDirs defines the variables it claims toAlex Merry
2014-05-08Make the KF5_LIBEXEC_INSTALL_DIR default depend on LIBEXEC_INSTALL_DIRAlex Merry
This way, overriding LIBEXEC_INSTALL_DIR will change where frameworks install libexec files in the expected way. REVIEW: 118048
2014-05-02Also set KF5_LIBEXEC_INSTALL_DIR on WindowsAlex Richardson
REVIEW: 117935
2014-04-30more updates to commentsJonathan Riddell
REVIEW: 117907
2014-04-30make documentation match new values in codeJonathan Riddell
2014-04-27Do not use a "kf5" subdirectory for PLUGIN_INSTALL_DIRAlex Merry
This is where applications install plugins, so "kf5" is incorrect. Software should use application- or framework-specific directories (which may or may not be versioned).
2014-04-27Library executables are installed to lib/libexecAleix Pol
Also provide a subdirectory specific to kf5 that will put them in lib/libexec/kf5
2014-04-26Fix KF5_INSTALL_TARGETS_DEFAULT_ARGS on MacAlex Merry
2014-04-26Add a KNOTIFYRC_INSTALL_DIR variable to KDEInstallDirsAlex Merry
KNotifications will look here for .notifyrc files.
2014-04-26Improve installation directories naming for services and servicetypesAleix Pol
kde5/services is kservices5 kde5/servicetypes is kservicestypes5
2014-04-26Provide a KF5_DATA_INSTALL_DIR variableAlex Merry
This provides versioning in a way that is simple to update for KF6, and reduces our footprint in /usr/share.
2014-04-26Remove KF5 suffix from INCLUDE_INSTALL_DIR default valueAlex Merry
Only frameworks should be installing in include/KF5. They use KF5_INCLUDE_INSTALL_DIR, which has the KF5 suffix, while other code should install to just include (or a subdirectory of their choice).
2014-04-26Add KF5_INCLUDE_INSTALL_DIR variable to KDEInstallDirsAlex Merry
Currently, this is the same as INCLUDE_INSTALL_DIR, but INCLUDE_INSTALL_DIR will lose the "KF5" suffix once the frameworks are changed to use KF5_INCLUDE_INSTALL_DIR. Because INCLUDE_INSTALL_DIR is used in INSTALL_TARGETS_DEFAULT_ARGS, there is now also a KF5_INSTALL_TARGETS_DEFAULT_ARGS.
2014-04-15Add TODOs to KDEInstallDirs.cmakeAlex Merry
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-02-14Improve docs for kde modulesAlex Merry
REVIEW: 115488
2014-02-12Install app desktop files to share/applications, not in a kde5 subdirAlex Merry
Given that binaries are all installed in PREFIX/bin, and have to avoid clashes, doing the same for desktop files is no great issue, and installing into a subdirectory of applications/ just complicates matters for client code that needs to refer to the desktop file (is it "kde5-foo[.desktop]", "kde5/foo[.desktop]" or just "foo[.desktop]"?). REVIEW: 115683
2014-01-20Remove KDE4 magic from _SET_FANCY in KDEInstallDirs.cmakeAlex Merry
This appears to be a hangover from the KDE4 days, which would adjust certain paths to match the ones for kdelibs if you installed an application to the same prefix as kdelibs. This was probably to make KStandardDirs work properly in unusual setups. REVIEW: 114904
2013-12-12Install all includes in a KF5 dirAurélien Gâteau
REVIEW: 114336