Commit Graph

21 Commits

Author SHA1 Message Date
Tim Blechmann
d2ceb2e353 cmake: avoid unused parameters in cmake tests
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>
2022-02-22 02:02:48 +08:00
Ilya Fedin
5a0849ed6b Handle glib optional components properly
Fixes: QTBUG-97929
Pick-to: 6.3
Change-Id: Ic73548cb10680a2ccd60faed2b0548c82892eaa1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-02-02 08:56:10 +04:00
Ilya Fedin
6bf41058a6 Add a QNetworkInformation backend based on GNetworkMonitor
GNetworkMonitor can get information from 3 sources:
* org.freedesktop.portal.NetworkMonitor
* NetworkManager
* netlink

Change-Id: Icfafe6af42148f26360449f1262093ffc6b0613a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-10-24 18:22:46 +04:00
Alexandru Croitor
8c1a35a991 CMake: Restore Qt-custom sanitizer additions to ECMEnableSanitizers
Restores addition of 'float-divide-by-zero' to undefined sanitizer
flags as well as the custom fuzzer-no-link option.

Pick-to: 6.2
Task-number: QTBUG-87989
Change-Id: Icde1e5d31083ce1b6128ab45b0e9df5ae69736a3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-06-25 12:33:58 +02:00
Alexandru Croitor
6b3e512e02 CMake: Update ECM sanitizer module to latest version
To bring support for sanitizers when using MSVC.

Pick-to: 6.2
Task-number: QTBUG-87989
Change-Id: I7a8ebf8fdaa31669df82d232fd9eae4e72407b92
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-06-25 12:33:58 +02:00
Andreas Buhr
1aec96bffd update KDE-ECM CMake modules to include fuzzer sanitizer
Updates one 3rdparty CMake file from
https://github.com/KDE/extra-cmake-modules to include support for
fuzzing.

Task-number: QTBUG-88429
Change-Id: I19e7ed3c5602c34ba4b86e6b0df2ea3047c7c9e6
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-14 10:05:20 +01:00
Julien Schueller
32309fb446 CMake: FindGLIB2 to include gthread2 sub-library
Avoids undefined references to g_thread_init.

Fixes: QTBUG-86727
Change-Id: Ic41b0dab9e4e23083faf4e9abcf7acc517172e49
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-28 15:48:17 +02:00
Samuli Piippo
3a4153766e CMake: use definitions when testing EGL
Use any definition from pkgconfig for the EGL compilation test.

Change-Id: I95c659b87ab7b0de81f000e3f52195161a493ef5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-25 08:04:39 +03:00
Cristian Adam
12e4b63d28 CMake Build: Fix libdrm detection and compilation on QNX
On QNX 7.1 x86drm.h is located under <...>/usr/include/libdrm, unlike
linux where it's present under /usr/include.

find_path would not find it on QNX, and instead get /usr/include from
host, which resulted in a failure to compile.

Task-number: QTBUG-83202
Change-Id: I03d6c2d4dfbe91bb70df0a322e84890bd7c8548a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-19 18:43:37 +02:00
Robert Loehning
7d7e62967f configure: Explicitly enable float-divide-by-zero with ubsan
Before clang 9, it was enabled by default
when -fsanitize=undefined was set.

Pick-to: 5.15
Change-Id: I0faf3ae1901d4badc6d265fa8081185be4360636
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-07 01:21:07 +02:00
Alexandru Croitor
375831a3dc CMake: Mark all find_package(PkgConfig) to be quiet
This reduces the amount of warning messages when the pkg-config
feature is disabled.

Task-number: QTBUG-85276
Change-Id: I11a6dfb6273a1e48c47d1ef5c1a5f70ba990fbc0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-06-29 12:23:10 +02:00
Alexandru Croitor
88f6087f01 CMake: Use NAME_MISMATCHED in find_package_handle_standard_args of ECM
Gets rid of mismatch warnings when looking for various
ECM packages like XCB.

Change-Id: I0bf4db993195993df7789c032454b7883e8efd35
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-05-01 19:11:25 +02:00
Samuli Piippo
4ddd4bf1aa Add additional include path for DRM
Tegra has drm.h header in include/drm instead of include/libdrm

Both paths are defined in libdrm.pc, but those are not used since this
cmake file searches only for xf86drm.h.

Change-Id: If1e979c7d5aec520b18eed5b3fcbb5ac2e15cc62
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-05 12:54:51 +00:00
Leander Beernaert
465949420a Update add_custom_command and add_custom_target dependencies
If we don't add the executable used by the custom_target and/or
custom_command to list of the command's/target's dependencies
(DEPENDS) the generated file will not update should the executable
change.

Change-Id: Idce30f3dd4f756d9e8f6848c5e16f5dd6c7c8f0a
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-03 08:07:03 +00:00
Simon Hausmann
76897659f8 Fix FindEGL on Emscripten
Fixes were upstreamed with commit
3b0bf71a72789eb2b79310b4f67602115e347f56 in extra-cmake-modules and this
brings the file in sync.

Change-Id: Ica3a29fd091afa669f29a3e9775e637566f1cb97
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-09-24 09:47:06 +00:00
Johan Klokkhammer Helsing
d6a491d607 CMake: Use FindWaylandScanner.cmake from extra-cmake-modules
Change-Id: Iaf78f215396671fc6f351ac20e686cfd2c39664f
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-20 07:28:32 +00:00
Tobias Hunger
8533e3d9e7 CMake: Remove 3rdparty/kwin/FindFontconfig.cmake
The one shipped with cmake is more modern:-)

Change-Id: I024769825467734ff1527e91df4cf5dfc38cbe68
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 09:33:56 +00:00
Simon Hausmann
22bd8576cb Update FindEGL.cmake from upstream
Upstream commit 7c64db9568296e1caafcfd7163cea3ab1b1626ae fixed the
suffix path checking and thus the build on FreeBSD.

Change-Id: I0cceeac0639c2899c617ffd6359098d2154acf5b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-20 09:33:28 +00:00
Simon Hausmann
cdab00c7ee Replace "our" FindEGL.cmake with the ECM version
The ECM version now also does a compile test, which was the only real
"functional" difference.

Change-Id: I1d5cd590359feba7c7a38ff374992349d5943070
Reviewed-by: Volker Krause <volker.krause@kdab.com>
2019-02-13 09:40:50 +00:00
Tobias Hunger
1218d8a9f0 CMake: Use FindGLIB2 from cmake-extra-modules
Use FindGLIB2 from cmake-extra-modules over hand-rolled own version.

Change-Id: I1f8e055bc12dd728c033fd88480690643d90159a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-01-31 13:56:55 +00:00
Simon Hausmann
e9c45bbddd Begin port of qtbase to CMake
Done-by: Alexandru Croitor <alexandru.croitor@qt.io>
Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Done-by: Kevin Funk <kevin.funk@kdab.com>
Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Done-by: Simon Hausmann <simon.hausmann@qt.io>
Done-by: Tobias Hunger <tobias.hunger@qt.io>
Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Done-by: Volker Krause <volker.krause@kdab.com>
Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
2018-11-01 11:48:46 +00:00