Apparently, more and more librt functionality are being moved to glibc
these days, e.g., clock_gettime, clock_getres, clock_settime,
clock_getcpuclockid, clock_nanosleep. As Thiago mentioned, in face,
all librt functions are moving into glibc, but unlike the clock_*
functions that I can see are ported from 2.17+, I cannot find out when
and what functions are already ported. So, here, I added a second test
which tries to explicitly look for shm_* functions, if they are there,
as well as the clock_* function, then we are more confident that we
actually have a useful the libRt in the system.
Also, making the FEATURE_posix_SHM depends on UNIX.
Pick-to: 6.5
Fixes: QTBUG-111049
Change-Id: I08b7f4656ecd9313b552fb05ca7096f5b987b95a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
CMakeLists.txt and .cmake files of significant size
(more than 2 lines according to our check in tst_license.pl)
now have the copyright and license header.
Existing copyright statements remain intact
Task-number: QTBUG-88621
Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
unused parameters in cmake tests cause the tests to fail when the
project is configured with `-Werror,-Wunused-parameter`
Change-Id: If3065d008753a7718282dfc6ba0d79d46576cb34
Pick-to: 6.2 6.3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
We must use the LIBRT location instead of LIBRT_FOUND which is not set anywhere.
I failed to replace this one in my previous patch.
Change-Id: I6e2df82c31e29018d99afec1eecfb80a321fddd4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
CMake IMPORTED targets should be namespaced so that CMake knows that
the name refers to a target and not a file.
Use the existing WrapXXX naming scheme where applicable.
Fixes: QTBUG-83773
Change-Id: I5b0b722c811200c56c260c69e76940a625228769
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
On Windows, when WrapRt is qt_find_pacakge()'d the first time, the
result is "not found", whereas a second time it would claim that the
package is found.
This is due to the WrapRt target being always created even if it has
no transitive dependencies, and thus a second search would check only
for the existence of the target.
Fix the module to only create the target if the relevant library
is found.
Change-Id: I5c838cbfbafb4029f96da815a0f72e4a8e6716b0
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
targets. This created issues when trying to build standalone examples.
Change-Id: Iaaea2b537793ae25fbf3143cc205574446aa4ad1
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
This change introduces a new function called qt_find_package()
which can take an extra option called PROVIDED_TARGETS, which
associates targets with the package that defines those targets.
This is done by setting the INTERFACE_QT_PACKAGE_NAME and
INTERFACE_QT_PACKAGE_VERSION properties on the imported targets.
This information allows us to generate appropriate find_dependency()
calls in a module's Config file for third party libraries.
For example when an application links against QtCore, it should also
link against zlib and atomic libraries. In order to do that, the
library locations first have to be found by CMake. This is achieved by
embedding find_dependency(ZLIB) and find_dependency(Atomic) in
Qt5CoreDependencies.cmake which is included by Qt5CoreConfig.cmake.
The latter is picked up when an application project contains
find_package(Qt5Core), and thus all linking dependencies are resolved.
The information 'which package provides which targets' is contained
in the python json2cmake conversion script. The generated output of
the script contains qt_find_package() calls that represent that
information.
The Qt5CoreDependencies.cmake file and which which dependencies it
contains is generated at the QtPostProcess stop.
Note that for non-static Qt builds, we only need to propagate public
3rd party libraries. For static builds, we need all third party
libraries.
In order for the INTERFACE_QT_PACKAGE_NAME property to be read in any
scope, the targets on which the property is set, have to be GLOBAL.
Also for applications and other modules to find all required third
party libraries, we have to install all our custom Find modules, and
make sure they define INTERFACE IMPORTED libraries, and not just
IMPORTED libraries.
Change-Id: I694d6e32d05b96d5e241df0156fc79d0029426aa
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>