Commit Graph

39938 Commits

Author SHA1 Message Date
Tobias Hunger
ee3d9a8b67 CMake: scripts: Fix mypy issues
Change-Id: I706740be79eccd6bf08213fdaf747dde08cd053a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-09 07:37:58 +00:00
Tobias Hunger
5608bf3cba CMake: pro2cmake.py: Add basic support for examples
Examples need to be built stand-alone and as part of Qt, so they
need a special CMakeLists.txt file that supports both use-cases.

Add an --is-example switch to pro2cmake to make it generate these special
CMakeLists.txt files.

This is basic support only and is currently still missing the necessary
find_package calls.

Change-Id: Ie770287350fb8a41e872cb0ea607923caa33073d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-09 07:37:42 +00:00
Tobias Hunger
5c98110fca CMake: Fix up after WrapFreetype introduction
Change-Id: I05ca6f8b055f470101ff0dcd1720a349a87e4ba9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-08 12:49:55 +00:00
Alexandru Croitor
0efe6fc90f Don't link against dbus-1_nolink when dbus_linked feature is off
dbus1_linked is only evaluated to true when the dbus package is found.
If it was not found, then it makes no sense to link against the
_nolink target, because no package was found in the first place.

When the package is not found, QtDBus uses a minimal dbus header which
is included with QtDBus sources, so there is no need for the _nolink
target.

This amends cc141cc5c6 and fixes a build
failure on macOS.

Change-Id: I71dcbb7465ad13b0bf03579f51412c373125caba
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-08 12:32:53 +00:00
Tobias Hunger
0c498ef4ff CMake: pro2cmake.py: Do not fail when run from .pro-file directory
Change-Id: I285b05986e3a58efc060ca0b5732f6e3f5121476
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-08 11:25:58 +00:00
Alexandru Croitor
9d96c8da78 Fix freetype target not being found when using vcpkg
vcpkg and upstream CMake find module define different target names for
the same package. To circumvent this, create our own Wrap find module,
and link against it. Inside the find module, try both target names.

Change-Id: Iba488bce0fb410ddb83f6414244f86ad367de72b
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-08 10:54:15 +00:00
Tobias Hunger
e8bb673301 CMake: Regenerate xcb platform plugin
This contains fixes to the improved library detection recently introduced.

Change-Id: I5df03b0c965dd0b8cf4b1769c752ecbb81558265
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-07 17:10:20 +00:00
Tobias Hunger
aa8af1283f CMake: Do not require ATSPI2 in platformsupport/linuxaccessibility
Change-Id: I3796ab3eb51306eec67460214c20a3c1c160edee
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-07 17:08:47 +00:00
Alexandru Croitor
aed2c1f5ae Force pro2cmake.py to always change the dir to the converted pro file
Otherwise if you call the script from a different directory, path
handling becomes broken and certain files are not found.

Change-Id: Ia2f60abbd312a771330b3d5e928e1ccd0b4a845b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-07 17:08:28 +00:00
Tobias Hunger
cc141cc5c6 CMake: Fix dbus build after dbus library detection update
Change-Id: If4d773136b1aa01204e012c6900458673a4c5670
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-07 15:07:07 +00:00
Tobias Hunger
5ec3baa67a CMake: scripts: Make xcb_qpa_lib known as a Qt module
Change-Id: I65f48d86c4ec946b38004b945078f29625e32d93
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-07 14:45:22 +00:00
Tobias Hunger
d5018720db CMake: scripts: Treat libraries mapped to None as known
This detects doubleconversion as a 3rd party library.

This fixes defaulting QT_FEATURE_system_doubleconversion to 'ON'.

Change-Id: I9d18dbbb6f7a99f6a5c674bed3013b96f19bf6e0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-07 14:41:31 +00:00
Tobias Hunger
bbe5c58079 CMake: Fix src/plugins/bearer
Sorry, last-minute-typo hit again:-/

Change-Id: I7130ba3306a96584e2bc33bc1aa27990a3508035
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-05-07 12:41:22 +00:00
Alexandru Croitor
97600f5562 Fix special cases in corelib
Change-Id: I506f379245619c8b5d248ea27dba35a165b455ee
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-06 14:54:14 +00:00
Alexandru Croitor
e6b7a3e459 Fix special cases in gui
Change-Id: I9553f1443a772c45748fafca079eaad2bf8cf1de
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-06 14:54:08 +00:00
Tobias Hunger
b65e7b2ffe CMake: Regenerate src/plugins/imageformats
Change-Id: Iea0f1b5f51508b7e8c2cad405dd3e293186c583a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:46:16 +00:00
Tobias Hunger
0434b7fb38 CMake: Regenerate src/plugins/bearer
Change-Id: I6c900247eb03b8afc3f299b5dbca5bac64527a52
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:46:11 +00:00
Tobias Hunger
9ffcc76188 CMake: Scripts: Fix double entries in 3rd party library mapping
Change-Id: I35f29876874d6083d19382800d194e417d57bca1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:29:20 +00:00
Tobias Hunger
aba911c4d0 CMake: Regenerate src/platformsupport/kmsconvenience
Change-Id: I2608275ca7cd5315e7ffdffbb25f78e98fbf9bc3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:29:11 +00:00
Tobias Hunger
d1a0af9b0c CMake: Regenerate src/platformsupport/platformcompositor
Change-Id: I435fb110ad59eb197401c6d8090c697ceb4cf687
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:28:45 +00:00
Tobias Hunger
1e5c90e6e2 CMake: Regenerate src/plugins
Change-Id: I64f920e909de7c612e3ab18b8aa31b98e0e1acfd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:27:43 +00:00
Tobias Hunger
b15776c76f CMake: Regenerate platformsupport/windowsuiautomation
Change-Id: I17c927cf7eb8c66ee941a2d91c918e105474da29
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:27:34 +00:00
Tobias Hunger
cbaa8ee27d CMake: Regenerate platformsupport/vkconvenience
This does not link to vulkan, just as it did before. Feels wrong...

Change-Id: I7e76e03e95ed33421de684f51c9943a84dde7779
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:27:24 +00:00
Tobias Hunger
ef170a12d8 CMake: Regenerate platformsupport/themes
Change-Id: Ica4b4c3f2a5f86476f179a01aea5eeb25e617a98
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:27:08 +00:00
Tobias Hunger
9b7f5776ee CMake: Regenerate platformsupport/services
Change-Id: I73444aeef2e37ebb2f90e8bae3e6932989bad5f0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:26:58 +00:00
Tobias Hunger
3d452d7c3b CMake: Regenerate platformsupport/linuxaccessibility
Use ATSPI with nolink!

Change-Id: I334fa93364109ca04b4312d12ddcea34d9e9a103
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:26:49 +00:00
Tobias Hunger
5d374083b7 CMake: Regenerate platformsupport/graphics
Change-Id: Ifff85f70de092ade438430d71d9a149f49363c14
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:24:51 +00:00
Tobias Hunger
775e595642 CMake: Regenerate platformsupport/fontdatabases
This one does actually contain functionality changes, but those look OK to me.

Change-Id: I5fd2caee16da86c529e1c83ca66452f780e54e26
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:24:42 +00:00
Tobias Hunger
f8d3b60fb1 CMake: Regenerate platformsupport/fbconvenience
Change-Id: Ic838debdca48553252cb4c32ec8a42695ba24b46
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:24:28 +00:00
Tobias Hunger
a7fc360b22 CMake: Regenerate platformsupport/eventdispatchers
Change-Id: Ie9cbee3fcb58673c08e8378382dd45e61fc4ff01
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:24:19 +00:00
Tobias Hunger
46b1676804 CMake: Regenerate src/platformsupport/edid
Change-Id: Id567354daa47c0be07211ebf01f92cd01be9a5c7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:24:06 +00:00
Tobias Hunger
c29fe1fae2 CMake: Regenerate src/platformsupport/devicediscovery
Change-Id: Ia306a7197c10fffb520e90eead449c551f0dfbe8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:23:55 +00:00
Tobias Hunger
65c5ffdb1d CMake: Regenerate src/platformsupport/clipboard
Change-Id: I6e61274a2f5796a6b4ddcbbdf03c345a03e4b91a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:23:44 +00:00
Tobias Hunger
f02a9c81ad CMake: Regenerate src/platformsupport/accessibility
Change-Id: Ie250afa3b4dc6c5750dd3cd15c1e83edcb7e0734
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:23:33 +00:00
Tobias Hunger
59e32c4e23 CMake: Regenerate src/platformsupport
Change-Id: I883573633dbd82ebcca9cc0dc435cd867cec24b8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:23:19 +00:00
Tobias Hunger
e438747eb1 CMake: Regenerate src/concurrent
Change-Id: I888f0a3821c091180928949bd52ea70a1be69d3f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:23:08 +00:00
Tobias Hunger
da02d17b5e CMake: Regenerate src/platfomheaders
Change-Id: I82d94c0f53bf3291cd26188ab6afd78493f2b92c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:22:57 +00:00
Tobias Hunger
1c310adb17 CMake: Regenerate src/opengl
Change-Id: I6a140b18f12cb048e2b113fb1cef38e224cc8417
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:22:47 +00:00
Tobias Hunger
42648ff993 CMake: Regenerate src/dbus
Change-Id: Iff9890ead883bac5f75425a2d0367e639d648399
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:22:36 +00:00
Tobias Hunger
059f4ade7f CMake: pro2cmake.py: Fix library mapping
Fix library substitution again which broke when I merged all the
library related pieces of information.

Keep Qt and 3rdparty libraries separate so that dbus does not get
mapped into Qt::DBus (or the other way around).

Make names in helper.py more consistent while at it.

Change-Id: I5e5bf02bdabf8bafe991c5701deca76bde4df2c3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:20:50 +00:00
Alexandru Croitor
f26a156dd3 Fix special cases in network
Change-Id: I66cc33afe3bfdf4e86dfeb0b341770355f59c0da
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-06 10:49:00 +00:00
Alexandru Croitor
380f1eb92f Fix special cases in widgets
Change-Id: I026a321a916885ccd93361da91bc3ce6fb6f6ad1
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-06 10:48:38 +00:00
Cristian Adam
1a92808a78 Add support for MinGW
Tested with MinGW 7.3.0 64 from Qt 5.12 installation.
The CMake 3rd party libraries I used from hunter project (with some
package, and target names changes)

Change-Id: Ie89555a6cd8bdb7182f9b2dd2c3c39784c523ead
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-04 20:56:17 +00:00
Alexandru Croitor
6b2de61bf9 Make zlib a required package for QtCore
Change-Id: Ifbb969fafe05e355d6874d8bebe2e8f1e80510ff
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-03 14:16:23 +00:00
Alexandru Croitor
a907d7df34 Handle generating find_dependency() calls for nolink targets
Previously we just recorded that Gui has to link against
Vulkan::Vulkan_nolink, but if an application consumed Gui, it wouldn't
find that target.

We need to record that if a module links against Vulkan_nolink, and
then generate a find_dependency(Vulkan) call in the module config
file.

We also have to assign the _nolink interface library to an export
(the Qt5 one), so that it gets installed as a target.

Change-Id: Icbc29ff4161ab18fdd162196ae128e29c1ee8c80
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-03 13:51:13 +00:00
Kevin Funk
aef11e420d cmake: Generate config files with Qt:: prefix
Generate CMake config files which export Qt targets with a Qt:: prefix
(i.e. without a major version suffix in the namespace)

Change-Id: Ia07f98be6d0e24c196e3880b7469f1f0c6232c06
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-03 13:51:02 +00:00
Kevin Funk
f2bb48e635 cmake: Install required CMake templates
Change-Id: I4a56440bee1aa7143971dd8f0b8af6dc042703f3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-03 13:50:44 +00:00
Tobias Hunger
7874ce7801 CMake: Improve mapping of libraries
Merge all data related to mapping libraries into one data structure
in helper.py.

Use that data for everything related to library mapping.

This change enables way more features now like e.g. adding find_package
calls into generated files.

Change-Id: Ibbd2a1063cbeb65277582d434a6a672d62fc170b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-03 13:42:25 +00:00
Tobias Hunger
9618434de5 CMake: configurejson2cmake: Do not generate useless OPTIONALs
Do not set properties of packages to type OPTIONAL. That is the default
anyway.

Update generator script and generated files.

Change-Id: I7a4d043b69c93ce8c2929a2e27ac6a07e4e6d8cc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-03 13:39:48 +00:00
Kevin Funk
d8cdbc4f97 cmake: Make add_qt_executable work
Also needs the include/ from the top-level binary dir added to the
include path.

Change-Id: I7e0d82a2ee24d9bf9ffe9da5fd02b3b223fd48e7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-03 12:49:37 +00:00