Changeset View
Standalone View
kde-modules/KDEInstallDirs.cmake
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Line(s) | |||||
85 | # ``SOUNDDIR`` | 85 | # ``SOUNDDIR`` | ||
86 | # sound files (``DATAROOTDIR/sounds``) [``SOUND_INSTALL_DIR``] | 86 | # sound files (``DATAROOTDIR/sounds``) [``SOUND_INSTALL_DIR``] | ||
87 | # ``TEMPLATEDIR`` | 87 | # ``TEMPLATEDIR`` | ||
88 | # templates (``DATAROOTDIR/templates``) [``TEMPLATES_INSTALL_DIR``] | 88 | # templates (``DATAROOTDIR/templates``) [``TEMPLATES_INSTALL_DIR``] | ||
89 | # ``WALLPAPERDIR`` | 89 | # ``WALLPAPERDIR`` | ||
90 | # desktop wallpaper images (``DATAROOTDIR/wallpapers``) | 90 | # desktop wallpaper images (``DATAROOTDIR/wallpapers``) | ||
91 | # [``WALLPAPER_INSTALL_DIR``] | 91 | # [``WALLPAPER_INSTALL_DIR``] | ||
92 | # ``APPDIR`` | 92 | # ``APPDIR`` | ||
93 | # application desktop files (``DATAROOTDIR/applications``) | 93 | # application desktop files (``DATAROOTDIR/applications``) Since 1.1.0. | ||
94 | # [``XDG_APPS_INSTALL_DIR``] | 94 | # [``XDG_APPS_INSTALL_DIR``] | ||
95 | # ``DESKTOPDIR`` | 95 | # ``DESKTOPDIR`` | ||
96 | # desktop directories (``DATAROOTDIR/desktop-directories``) | 96 | # desktop directories (``DATAROOTDIR/desktop-directories``) | ||
97 | # [``XDG_DIRECTORY_INSTALL_DIR``] | 97 | # [``XDG_DIRECTORY_INSTALL_DIR``] | ||
98 | # ``MIMEDIR`` | 98 | # ``MIMEDIR`` | ||
99 | # mime description files (``DATAROOTDIR/mime/packages``) | 99 | # mime description files (``DATAROOTDIR/mime/packages``) | ||
100 | # [``XDG_MIME_INSTALL_DIR``] | 100 | # [``XDG_MIME_INSTALL_DIR``] | ||
101 | # ``METAINFODIR`` | 101 | # ``METAINFODIR`` | ||
102 | # AppStream component metadata files (``DATAROOTDIR/metainfo``) | 102 | # AppStream component metadata files (``DATAROOTDIR/metainfo``) | ||
103 | # ``QTQCHDIR`` | ||||
104 | # documentation bundles in QCH format for Qt-extending libraries (``DATAROOTDIR/doc``) Since 5.36.0. | ||||
105 | # ``QCHDIR`` | ||||
106 | # documentation bundles in QCH format (``DATAROOTDIR/doc/qch``) Since 5.36.0. | ||||
103 | # ``MANDIR`` | 107 | # ``MANDIR`` | ||
104 | # man documentation (``DATAROOTDIR/man``) [``MAN_INSTALL_DIR``] | 108 | # man documentation (``DATAROOTDIR/man``) [``MAN_INSTALL_DIR``] | ||
105 | # ``INFODIR`` | 109 | # ``INFODIR`` | ||
106 | # info documentation (``DATAROOTDIR/info``) | 110 | # info documentation (``DATAROOTDIR/info``) | ||
107 | # ``DBUSDIR`` | 111 | # ``DBUSDIR`` | ||
108 | # D-Bus (``DATAROOTDIR/dbus-1``) | 112 | # D-Bus (``DATAROOTDIR/dbus-1``) | ||
109 | # ``DBUSINTERFACEDIR`` | 113 | # ``DBUSINTERFACEDIR`` | ||
110 | # D-Bus interfaces (``DBUSDIR/interfaces``) | 114 | # D-Bus interfaces (``DBUSDIR/interfaces``) | ||
▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | |||||
169 | # ``LIBDIR`` and ``INCLUDEDIR``, can cause issues with exported targets. Given | 173 | # ``LIBDIR`` and ``INCLUDEDIR``, can cause issues with exported targets. Given | ||
170 | # that the default values for these are relative paths, relative paths should | 174 | # that the default values for these are relative paths, relative paths should | ||
171 | # be used on the command line when possible (eg: use | 175 | # be used on the command line when possible (eg: use | ||
172 | # ``-DKDE_INSTALL_LIBDIR=lib64`` instead of | 176 | # ``-DKDE_INSTALL_LIBDIR=lib64`` instead of | ||
173 | # ``-DKDE_INSTALL_LIBDIR=/usr/lib/lib64`` to override the library directory). | 177 | # ``-DKDE_INSTALL_LIBDIR=/usr/lib/lib64`` to override the library directory). | ||
174 | # | 178 | # | ||
175 | # Since pre-1.0.0. | 179 | # Since pre-1.0.0. | ||
176 | # | 180 | # | ||
177 | # NB: The variables starting ``KDE_INSTALL_`` are only available since 1.6.0. | 181 | # NB: The variables starting ``KDE_INSTALL_`` are available since 1.6.0, | ||
178 | # The ``APPDIR`` install variable is available since 1.1.0. | 182 | # unless otherwise noted with the variable. | ||
179 | 183 | | |||
180 | #============================================================================= | 184 | #============================================================================= | ||
181 | # Copyright 2014-2015 Alex Merry <alex.merry@kde.org> | 185 | # Copyright 2014-2015 Alex Merry <alex.merry@kde.org> | ||
182 | # Copyright 2013 Stephen Kelly <steveire@gmail.com> | 186 | # Copyright 2013 Stephen Kelly <steveire@gmail.com> | ||
183 | # Copyright 2012 David Faure <faure@kde.org> | 187 | # Copyright 2012 David Faure <faure@kde.org> | ||
184 | # Copyright 2007 Matthias Kretz <kretz@kde.org> | 188 | # Copyright 2007 Matthias Kretz <kretz@kde.org> | ||
185 | # Copyright 2006-2007 Laurent Montel <montel@kde.org> | 189 | # Copyright 2006-2007 Laurent Montel <montel@kde.org> | ||
186 | # Copyright 2006-2013 Alex Neundorf <neundorf@kde.org> | 190 | # Copyright 2006-2013 Alex Neundorf <neundorf@kde.org> | ||
▲ Show 20 Lines • Show All 256 Lines • ▼ Show 20 Line(s) | |||||
443 | if(NOT DEFINED KDE_INSTALL_USE_QT_SYS_PATHS) | 447 | if(NOT DEFINED KDE_INSTALL_USE_QT_SYS_PATHS) | ||
444 | query_qmake(qt_install_prefix_dir QT_INSTALL_PREFIX) | 448 | query_qmake(qt_install_prefix_dir QT_INSTALL_PREFIX) | ||
445 | if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}") | 449 | if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}") | ||
446 | message(STATUS "Installing in the same prefix as Qt, adopting their path scheme.") | 450 | message(STATUS "Installing in the same prefix as Qt, adopting their path scheme.") | ||
447 | set(_default_KDE_INSTALL_USE_QT_SYS_PATHS ON) | 451 | set(_default_KDE_INSTALL_USE_QT_SYS_PATHS ON) | ||
448 | endif() | 452 | endif() | ||
449 | endif() | 453 | endif() | ||
450 | 454 | | |||
451 | option (KDE_INSTALL_USE_QT_SYS_PATHS "Install mkspecs files, Plugins and Imports to the Qt 5 install dir" "${_default_KDE_INSTALL_USE_QT_SYS_PATHS}") | 455 | option (KDE_INSTALL_USE_QT_SYS_PATHS "Install mkspecs files, QCH files for Qt-based libs, Plugins and Imports to the Qt 5 install dir" "${_default_KDE_INSTALL_USE_QT_SYS_PATHS}") | ||
452 | if(KDE_INSTALL_USE_QT_SYS_PATHS) | 456 | if(KDE_INSTALL_USE_QT_SYS_PATHS) | ||
453 | # Qt-specific vars | 457 | # Qt-specific vars | ||
454 | query_qmake(qt_plugins_dir QT_INSTALL_PLUGINS) | 458 | query_qmake(qt_plugins_dir QT_INSTALL_PLUGINS) | ||
455 | 459 | | |||
456 | _define_absolute(QTPLUGINDIR ${qt_plugins_dir} | 460 | _define_absolute(QTPLUGINDIR ${qt_plugins_dir} | ||
457 | "Qt plugins" | 461 | "Qt plugins" | ||
458 | QT_PLUGIN_INSTALL_DIR) | 462 | QT_PLUGIN_INSTALL_DIR) | ||
459 | 463 | | |||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | |||||
515 | _define_relative(DATADIR DATAROOTDIR "" | 519 | _define_relative(DATADIR DATAROOTDIR "" | ||
516 | "read-only architecture-independent data" | 520 | "read-only architecture-independent data" | ||
517 | DATA_INSTALL_DIR) | 521 | DATA_INSTALL_DIR) | ||
518 | _define_non_cache(DATADIR_KF5 "${CMAKE_INSTALL_DATADIR}/kf5") | 522 | _define_non_cache(DATADIR_KF5 "${CMAKE_INSTALL_DATADIR}/kf5") | ||
519 | if(NOT KDE_INSTALL_DIRS_NO_DEPRECATED) | 523 | if(NOT KDE_INSTALL_DIRS_NO_DEPRECATED) | ||
520 | set(KF5_DATA_INSTALL_DIR "${CMAKE_INSTALL_DATADIR_KF5}") | 524 | set(KF5_DATA_INSTALL_DIR "${CMAKE_INSTALL_DATADIR_KF5}") | ||
521 | endif() | 525 | endif() | ||
522 | 526 | | |||
527 | # Qt-specific data vars | ||||
528 | if(KDE_INSTALL_USE_QT_SYS_PATHS) | ||||
529 | query_qmake(qt_docs_dir QT_INSTALL_DOCS) | ||||
530 | | ||||
531 | _define_absolute(QTQCHDIR ${qt_docs_dir} | ||||
532 | "documentation bundles in QCH format for Qt-extending libraries") | ||||
533 | else() | ||||
534 | _define_relative(QTQCHDIR DATAROOTDIR "doc/qch" | ||||
shumski: I think e.g. QMLDIR, PLUGINDIR, ECM_MKSPECS_INSTALL_DIR, etc. are vanilla Qt's. QCH files are… | |||||
Not sure what you mean, please point out the issue you see here with more details :) The plan here is: kossebau: Not sure what you mean, please point out the issue you see here with more details :)
The plan… | |||||
I mean, addition of qch subdir is 'your' invention here. shumski: I mean, addition of qch subdir is 'your' invention here.
If Frameworks were to use only qmake… | |||||
But that is the same for the current QTPLUGINDIR, QTQUICKIMPORTSDIR, & QMLDIR, no? They also only get set to the Qt system paths if KDE_INSTALL_USE_QT_SYS_PATHS=ON, otherwise get set to something based on general LIBDIR. kossebau: But that is the same for the current QTPLUGINDIR, QTQUICKIMPORTSDIR, & QMLDIR, no? They also… | |||||
Right. But if you install a framework to same prefix as Qt, you get free recognition of plugins, qml imports, etc... This is valid for both /usr and custom prefix installs. shumski: Right. But if you install a framework to same prefix as Qt, you get free recognition of plugins… | |||||
But isn't this free recognition happening via KDE_INSTALL_USE_QT_SYS_PATHS as well? kossebau: But isn't this free recognition happening via KDE_INSTALL_USE_QT_SYS_PATHS as well?
At least… | |||||
It is :) But with this latest revision it is not when that var is off =) I'm saying that for both cases it should happen. shumski: It is :) But with this latest revision it is not when that var is off =) I'm saying that for… | |||||
Fear I am still missing what you mean. So let's go explicitely, here is what I understand to happen: There are six different cases when using this macro and on the first invocation of cmake, from the combinations of installing to a different prefix or the same prefix as Qt (2 variants) versus KDE_INSTALL_USE_QT_SYS_PATHS being not set/defined, set to ON, set to OFF (3 variants). In these 3 cases plugins, QCH & Co. will be all installed to Qt system dirs and thus automatically picked up by Qt, without the need for further env var settings:
In the three other cases plugins, QCH & Co will be installed in dirs and need further env var settings, for Qt (and Qt Assistant) to also pick up the stuff. Where do we see things differently? And just to make sure, you have seen the right lines at the link I passed before, how _default_KDE_INSTALL_USE_QT_SYS_PATHS is set to ON if the same prefix is used? kossebau: Fear I am still missing what you mean. So let's go explicitely, here is what I understand to… | |||||
Hm, i guess i haven't checked KDEInstallDirs in a while. Somehow i remember KDE_INSTALL_USE_QT_SYS_PATHS was only activated by default if CMAKE_INSTALL_PREFIX was /usr. Ok, so the non-recognition part should not happen that often -> I'm assuming qch files are looked up as QLibraryInfo::DocumentationPath (so, QT_INSTALL_DOCS) + *qch. So with your path, they will not be found (yeah with different prefix they aren0t still found, but with qch/ subdir user needs one additional envar for KF5 qch's - imagine you need to export QT_PLUGIN_PATH for Qt plugins, and one more path for KF5 plugins). shumski: Hm, i guess i haven't checked KDEInstallDirs in a while. Somehow i remember… | |||||
Any chance you perhaps misread the code? Because what you say does not match what should happen at least by what I intended by the code (and what it does on testing) :) The qch/ subdir is used with the non-QT_INSTALL_DOCS installation directory. So _define_relative(QTQCHDIR DATAROOTDIR "doc/qch") would be e.g. "/usr/share/doc/qch" when installing to prefix /usr. Both this and "/usr/share/doc" will never result in Qt Assistant automatically adding the QCH file to the default help file collection. This only happens when installing directly into QT_INSTALL_DOCS (undocumented feature, but stable for some time :) ). In the branch which sets up QTQCHDIR to be the Qt system dir, _define_absolute(QTQCHDIR ${qt_docs_dir}) will result in QTQCHDIR being equal to QT_INSTALL_DOCS. No /qch subdir here. kossebau: Any chance you perhaps misread the code? Because what you say does not match what should happen… | |||||
535 | "documentation bundles in QCH format for Qt-extending libraries") | ||||
536 | endif() | ||||
537 | | ||||
538 | | ||||
523 | # KDE Framework-specific things | 539 | # KDE Framework-specific things | ||
524 | _define_relative(DOCBUNDLEDIR DATAROOTDIR "doc/HTML" | 540 | _define_relative(DOCBUNDLEDIR DATAROOTDIR "doc/HTML" | ||
525 | "documentation bundles generated using kdoctools" | 541 | "documentation bundles generated using kdoctools" | ||
526 | HTML_INSTALL_DIR) | 542 | HTML_INSTALL_DIR) | ||
527 | _define_relative(KCFGDIR DATAROOTDIR "config.kcfg" | 543 | _define_relative(KCFGDIR DATAROOTDIR "config.kcfg" | ||
528 | "kconfig description files" | 544 | "kconfig description files" | ||
529 | KCFG_INSTALL_DIR) | 545 | KCFG_INSTALL_DIR) | ||
530 | _define_relative(KCONFUPDATEDIR DATAROOTDIR "kconf_update" | 546 | _define_relative(KCONFUPDATEDIR DATAROOTDIR "kconf_update" | ||
Show All 36 Lines | |||||
567 | _define_relative(DESKTOPDIR DATAROOTDIR "desktop-directories" | 583 | _define_relative(DESKTOPDIR DATAROOTDIR "desktop-directories" | ||
568 | "desktop directories" | 584 | "desktop directories" | ||
569 | XDG_DIRECTORY_INSTALL_DIR) | 585 | XDG_DIRECTORY_INSTALL_DIR) | ||
570 | _define_relative(MIMEDIR DATAROOTDIR "mime/packages" | 586 | _define_relative(MIMEDIR DATAROOTDIR "mime/packages" | ||
571 | "mime description files" | 587 | "mime description files" | ||
572 | XDG_MIME_INSTALL_DIR) | 588 | XDG_MIME_INSTALL_DIR) | ||
573 | _define_relative(METAINFODIR DATAROOTDIR "metainfo" | 589 | _define_relative(METAINFODIR DATAROOTDIR "metainfo" | ||
574 | "AppStream component metadata") | 590 | "AppStream component metadata") | ||
591 | _define_relative(QCHDIR DATAROOTDIR "doc/qch" | ||||
592 | "documentation bundles in QCH format") | ||||
575 | _define_relative(MANDIR DATAROOTDIR "man" | 593 | _define_relative(MANDIR DATAROOTDIR "man" | ||
576 | "man documentation" | 594 | "man documentation" | ||
577 | MAN_INSTALL_DIR) | 595 | MAN_INSTALL_DIR) | ||
578 | _define_relative(INFODIR DATAROOTDIR "info" | 596 | _define_relative(INFODIR DATAROOTDIR "info" | ||
579 | "info documentation") | 597 | "info documentation") | ||
580 | _define_relative(DBUSDIR DATAROOTDIR "dbus-1" | 598 | _define_relative(DBUSDIR DATAROOTDIR "dbus-1" | ||
581 | "D-Bus") | 599 | "D-Bus") | ||
582 | _define_relative(DBUSINTERFACEDIR DBUSDIR "interfaces" | 600 | _define_relative(DBUSINTERFACEDIR DBUSDIR "interfaces" | ||
▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines |
I think e.g. QMLDIR, PLUGINDIR, ECM_MKSPECS_INSTALL_DIR, etc. are vanilla Qt's. QCH files are thus installed straight into QT_INSTALL_DOCS dir AFAICS ...