Age | Commit message (Collapse) | Author |
|
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
|
|
|
|
Cmp. https://bugzilla.gnome.org/show_bug.cgi?id=783759
|
|
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
|
|
Summary:
The old guard was created just from the identifier + _H, which runs the
chance to clash in projects which use an identifier matching the project
name and which also have a class or central file header which is named
by the project and then has an include guard matching the filename.
Example:
project ABC -> abc.h with ABC_H guard
identifier ABC, header debug.h -> debug.h with ABC_H guard
any.cpp including both abc.h and debug.h will see only one content
Using both the header file name and identifier for the guard name
and prefixing it additionally with a macro specific term should make
the guard both follow the usual pattern for guards matching the
file name and also add some namespacing to allow for similar named
header files in bigger projects (e.g. "debug.h") which could be
included in the same include tree.
Reviewers: #frameworks, #build_system
Subscribers: elvisangelaccio
Tags: #frameworks, #build_system
Differential Revision: https://phabricator.kde.org/D5866
|
|
Reviewers: #frameworks, #build_system, apol
Reviewed By: apol
Tags: #frameworks, #build_system
Differential Revision: https://phabricator.kde.org/D5867
|
|
Summary:
FreeBSD, opposed to most other sytems, does not install pkgconfig files to
lib/pkgconfig, but to libdata/pkgconfig.
Reviewers: #freebsd, apol, kfunk
Reviewed By: kfunk
Subscribers: kfunk, #frameworks, #build_system
Tags: #frameworks, #build_system
Differential Revision: https://phabricator.kde.org/D5766
|
|
Summary:
Fixes compiler warnings such as:
```
cl : Command line warning D9002 : ignoring unknown option
'-fsanitize=address'
cl : Command line warning D9002 : ignoring unknown option
'-fno-omit-frame-pointer'
```
Reviewers: aacid, bcooksley
Reviewed By: aacid, bcooksley
Subscribers: #frameworks, #build_system
Tags: #frameworks, #build_system
Differential Revision: https://phabricator.kde.org/D5489
|
|
|
|
|
|
We have tests that go through the modules directory
|
|
|
|
The build isn't always reproducible and comparisons are unfair
|
|
|
|
Summary:
Introduces a function that allows to generate plugins.qmltypes files for our
qml plugins using qmlplugindump much like Qt does.
Test Plan: Introduced it locally on Purpose and it works
Reviewers: #frameworks, #build_system
Tags: #frameworks, #build_system
Differential Revision: https://phabricator.kde.org/D5087
|
|
Summary:
CMP0053 specifies that:
- Expansion of ``@VAR@`` reference syntax defined by the
``configure_file()`` and ``string(CONFIGURE)``
commands is no longer performed in other contexts.
replace it with the $ variable syntax.
Test Plan: manual
Reviewers: #frameworks, dfaure
Reviewed By: dfaure
Subscribers: #build_system
Tags: #frameworks, #build_system
Differential Revision: https://phabricator.kde.org/D5017
|
|
SVG files that fail to convert will still trigger a warning.
|
|
Inform the user that SVG icons can now be provided in the macro call;
on Mac the first that converts to .icns (if ksvg2icns is available) will
provide the application icon. Other SVG files are ignored, idem on
other platforms.
|
|
KIconThemes comes with a ksvg2icns utility that converts .sgv and .sgvz
files to native .icns icon files. Using this utility allows to create
icons with optimum resolution regardless of the available .png images
and of limitations of the host's iconutil application (limited to
256x256 on some Mac OS versions).
REVIEW: 128162
|
|
Test plan: Clang and GCC for simple C project, kcoreaddons, kjs, etc.
BUG: 374195
REVIEW: 129708
Reviewers: #extracmakemodules, alexmerry
Reviewed By: dfaure, aacid
|
|
This reverts commit 1e7f3d5ba91e79a47d69a48e8f991ee0e7794b53.
It's breaking compilation of anything that uses pthreads
|
|
BUG: 374195
REVIEW: 129708
Reviewers: #extracmakemodules, alexmerry
Reviewed By: dfaure
|
|
GIT_SILENT
|
|
Triggered my OCD
|
|
REVIEW: 128112
|
|
REVIEW: 128823
|
|
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
|
|
REVIEW: 128780
|
|
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.
|
|
Addresses its usage on systems where Qt5 isn't installed, it allows for
modules using it to decide what they should do.
REVIEW: 128488
|
|
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
|
|
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
|
|
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
|
|
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
|
|
This reverts commit 1d4bc35cf9383177459544d6fcd9de35edf3e77d.
QLoggingCategory has always included QDebug, so this has always been
superfluous.
|
|
REVIEW: 126711
|
|
This is required to find poppler without package config as all the headers
are installed in a poppler subdirectory of the include directory
|
|
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
|
|
REVIEW: 126414
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
CCMAIL: kde-licensing@kde.org
CCMAIL: agateau@kde.org
|
|
BUG: 346188
REVIEW: 123726
|
|
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
|
|
Despite the name, Qt is also using this, and it considerably speeds up
icon lookup.
REVIEW: 125192
|
|
|