Commit Graph

10 Commits

Author SHA1 Message Date
Lucie Gérard
32df595275 Change the license of all CMakeLists.txt and *.cmake files to BSD
Task-number: QTBUG-105718
Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-23 23:58:42 +02:00
Lucie Gérard
fb1b20eab3 Add license headers to cmake files
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>
2022-08-03 17:14:55 +02:00
Alexandru Croitor
3c52f8af9d CMake: pro2cmake: Specify library versions for 3rd party libraries
If certain 3rd party libraries have a version that's not suitable for
Qt, the configure summary should say so, rather than use them and fail
at build time.

With the current situation, we have to duplicate the version
information from the configure.json files in helper.py, by assigning
the version number as an extra find_package variable.

Rerunning configurejson2cmake then embeds this version info into the
qt_find_package calls in configure.cmake.

Some of the Find modules are rewritten to take the  specified version
into account when looking for the libraries.
This involves moving around the code for creating a target, after
calling find_package_handle_standard_args() so we know if a good
enough version was found.

Task-number: QTBUG-82917
Change-Id: I139748d8090e0630cda413362760034dc3483e11
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-08-10 11:56:54 +02:00
Alexandru Croitor
b0772b41c2 CMake: Display found information in some of the Find modules
Change-Id: I5d92f2f1a552888361a2939577c2b0177c62b596
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-26 22:14:48 +02:00
Alexandru Croitor
cf3cef1ef5 CMake: Make more inner find_package calls quiet
Task-number: QTBUG-85276
Change-Id: I8ed84e2f2cdaf90224452a5e5a549791574edc15
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-26 22:14:38 +02:00
Alexandru Croitor
a6eb7c641b CMake: Fix dbus duplicate target errors in top-level builds
Fixes the 'add_library cannot create imported target "dbus-1"
because another target with the same name already exists' error
when doing top-level static builds.

It's caused by the loading of Qt6DBus dependency when configuring
qttools.

Task-number: QTBUG-84874
Change-Id: Ia84ed460c4ce25de45fb41cb13edd0e63a276f11
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-10 13:46:24 +02:00
Leander Beernaert
a43f2a6caa Safeguard against multiple definition of dbus-1 target
Change-Id: Ibba9ce7ce472fe2939386065087f0b07ad811c3f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CMake Build Bot
2020-02-06 12:21:49 +00:00
Alexandru Croitor
fe1a018d00 Fix some find modules not setting _FOUND variable
If the target exists or the find_package() call succeeds
we still need to set _FOUND to 1.

Change-Id: Ib2267c30580082dcc177ab21708a3bc5dbde974f
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Qt CMake Build Bot
2019-09-27 14:30:23 +00:00
Albert Astals Cid
6396d46f55 cmake: Correct way to save/restore env vars
for pkgconfig it is different if they are not defined vs an empty string

Change-Id: Ifb05db5dab32a699aafa32d91f9719eab78dee44
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-10 16:33:15 +00:00
Tobias Hunger
400f94109d CMake: Wrap DBus1 find_package call to fix xproto not being picked up
DBus1 (1.12) configuration file breaks PKG_CONFIG environment
variables and will thus prevent other libraries to be picked up
by pkgconfig. Main sympthom is that xproto is not getting picked
up anymore, which results in hundreds of lines of warnings about
this being printed.

Work around that by wrapping the call to find_package(DBus1) and
restoring the environment.

Change-Id: Ia69f10b014dddc32045b40972500a843e5d29b38
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-10 15:09:49 +00:00