Commit Graph

38016 Commits

Author SHA1 Message Date
Tobias Hunger
9d83b54015 CMake: pro2cmake.py: Fix handling of file paths
This patch makes sure to store unchanged filenames as taken from qmake
into the scopes it creates.

The scopes are then kept longer: Merging/including scopes is handled by
adding the scope to a private _included_children member of the parent scope.

The methods to access data from scopes are then changed to take the
_included_children into account and a new "get_files" method is added,
that does all the necessary mapping to handle scope-dependent things like
$$PWD, etc.

This makes sure src/network is converted correctly incl. all the .pri-files it
includes as well as src/platformsupport/themes.pro. Both have been troublesome
before.

Change-Id: I28e92b7bcee1b91b248c17201c2729a54a3ce4a1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-04-09 07:28:30 +00:00
Tobias Hunger
52f676bf66 CMake: pro2cmake.py: Better representation of scopes as str
Include the current directory in the scope __repr__ output to make
it easier to understand where things wrt. include or file names go
wrong.

Change-Id: I09a6c17c6d8d547f1f64801bcde3c2e10c925ee1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-04-09 07:28:18 +00:00
Tobias Hunger
77a465ea2d CMake: pro2cmake.py: Better handling of debug features
Improve way that debug features are detected.

Change-Id: Ic0f0e74885e6d1e7f236c9efe4c77482ac212dbc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-04-09 07:28:08 +00:00
Tobias Hunger
9365a01531 CMake: pro2cmake.py: Fix typing information
Change-Id: Iaa6ea69c3c72eb1b626a976fcdb16243f15c609e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-04-09 07:27:59 +00:00
Tobias Hunger
81542ffb91 CMake: Map linuxaccessibility_supportPrivate to Qt::LASP
Change-Id: I6066f69c74c39fb97a286eb92748b5c4172b1efd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-04-09 07:27:48 +00:00
Alexandru Croitor
4f07e711c9 Add script to print out list of unconverted .pro files
Also prints some statistics.

Change-Id: Ieb55618c0d39604ca76d7a44390e61e02824a01f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-04-08 14:53:46 +00:00
Alexandru Croitor
f896a5019a Stop installing test helpers
Tests and their helpers should only be used in the build directory.

Change-Id: I5aa9fcf734b6b3667f91df7c84d083f944c452c9
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-04-08 14:53:35 +00:00
Alexandru Croitor
e0b4144486 Force feature_summary to fail when a required package is not found
Apparently calling set_package_properties with TYPE REQUIRED and
then calling feature_summary with FATAL_ON_MISSING_REQUIRED_PACKAGES
and PACKAGES_NOT_FOUND is not enough to make CMake fail when not
finding a required package.

You have to explicitly set REQUIRED_PACKAGES_NOT_FOUND to force
feature_summary to fail when a package is not found.

Do this, and also explicitly add the rest of the NOT FOUND cases,
to get a slightly clearer overview what kind of packages were not
found.

Task-number: QTBUG-74133
Change-Id: Id21af13dafafe0a458cff479e8abbc6aa7e6a3f7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-04-08 14:53:24 +00:00
Alexandru Croitor
5691d2f47b Fix yocto cross build
When cross-compiling Qt using a Yocto sysroot, if the sysroot
already contains an installed Qt version, and a project (library
or executable) does not explicitly link against all of its
Qt dependencies, the cross linker will try to find a suitable library
in the sysroot ./lib folder.

This mighy lead to issues, because the linker will pick up an
installed Qt library which might have different symbol versioning,
and thus cause linker errors.

This happened with the print support module.
Make sure the print support module explicitly links against the newly
built Qt modules.

Task-number: QTBUG-74133
Change-Id: I876b1507c655673831e78dcfe737a5ede2a8c087
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-04-08 12:41:42 +00:00
Albert Astals Cid
867956a843 cmake: Build qcommandlineparser/testhelper
Change-Id: I1042e85575b39df18bcaaff7b57acc15d8552e6d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-05 15:57:32 +00:00
Albert Astals Cid
067d5dc027 cmake: Run tests from their build dir
It's what the qmake build does

Change-Id: I99663735859941b56c2211898908d61bc6c4b48f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-05 15:57:20 +00:00
Albert Astals Cid
9947909bfa cmake: Put the test helpers binaries in their parent folder
Makes qtextcodec test succeed

Like qmake does

qt_test_helper.prf says
"
If an auto test needs a helper application, this helper should
be put into the same directory as the test itself.
"

Change-Id: I02cb36d2237cdb72912c943250b843c33ffcd64a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-04 14:12:03 +00:00
Alexandru Croitor
bb04a85bdf Stop installing unnecessary things
This includes:
- tests
- tools that are only used duing the Qt build (tracegen and
  qfloat16-tables)

Change-Id: I3a5f678682b5b9318012568a9e4dcdda0967f89b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-04-03 11:08:57 +00:00
Alexandru Croitor
547c7f8ca5 Fix architecture conditions
The actual variable that contains the architecture is
TEST_architecture_arch. TEST_architecture only contains the value
if the test was performed or not.

Fix the conversion script and all the generated files.

Change-Id: Icb3480832cab894948f4fef03b8bc8187cab6152
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-04-03 09:00:08 +00:00
Tobias Hunger
9a7de16fac CMake: Re-generate plugins/platforms/eglfs
Change-Id: I62651eac0eede77f1b7fa86e198f71b0ea1da2c7
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-04-03 08:54:51 +00:00
Tobias Hunger
11f217d21b CMake: Re-generate plugins/platforms/windows
Change-Id: I53f10995792d01e8f04cdb8f37fcf347132aa4fa
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-04-03 08:54:40 +00:00
Tobias Hunger
bd0f9b61fd CMake: Re-generate plugins/platforms/cocoa
Change-Id: I6d37e018a114ba90690a6fbd8d5af71f6d1b31fd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-03 08:54:30 +00:00
Tobias Hunger
8a9962aba8 CMake: Add FindCups.cmake from upstream cmake
This FindCups defines a target, which the FindCups.cmake in the currently
required CMake version does not:-/

Change-Id: I76c5bb72ece80415db1971e4f2079682126fde36
Todo: Remove again once we depend on CMake 3.15.
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-03 08:54:14 +00:00
Tobias Hunger
29f5c0ee70 CMake: Map cups to Cups::Cups, vulkan_support_private to Qt::VulkanSupportPrivate
Change-Id: Id03942becb08ca3ece589479ffe515f68034ddd4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-03 08:53:57 +00:00
Tobias Hunger
0be63eeba7 CMake: Re-generate plugins/sqldrivers/sqlite
Change-Id: I795c9d6045eb34e9d517cf25337b4e31d3ad0284
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-03 08:53:40 +00:00
Tobias Hunger
e3b2ff0014 CMake: Re-generate testlib
Change-Id: Id3e6a3ff325ed55ac20a93683260ef3366c0ddab
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-03 08:53:31 +00:00
Tobias Hunger
1aff970c49 CMake: Re-generate platformsupport/clipboard
Change-Id: If05ae02f363a4a9ef6193f7f8822dcbbc58e1738
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-03 08:53:21 +00:00
Alexandru Croitor
15f5a347fe Add a debug suffix to libraries and plugins on macOS and Windows
This is especially important on macOS when doing a debug build,
because QPluginLoader is looking for the cocoa QPA plugin
suffixed with "_debug" when executing a test or example.

Change-Id: Ief23b3a82c567c16ab9dd30d04d1729031262d7d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-04-02 13:32:38 +00:00
Alexandru Croitor
e2e4525f78 Fix simplification of conditions involving apple
Previously a condition like APPLE AND (NOT APPLE_OSX) got simplified
to APPLE, which is wrong.

This happened by accident due to some sub-family simplifications
involving BSD, which APPLE was part of.

Technically APPLE is BSD derived, but for the purposes of the
conversion script consider APPLE not to be a BSD (hopefully there
should be no cases of using the bsd scope for apple machines in
qmake files.

Also regenerate the fontdatabase project, where the issue was found.

Change-Id: I18dcf4f29ffbff48c183ba95ca2a2e5cd5325d86
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-04-02 13:32:21 +00:00
Tobias Hunger
72e0f74e31 CMake: Re-generate opengl
Change-Id: I8aca37a7f07ced03500779c708374f7553684c37
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-02 13:17:37 +00:00
Tobias Hunger
5c05c46e92 CMake: Set define for default QPA platform
This is used to set the default QPA platform and without it
all Gui applications trigger an assert in QString:-/

This is way simpler than going through configure.json.

Change-Id: I2c053e95c0f7e99e97a0b2918d8e4ac13d3494fd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-02 13:17:26 +00:00
Tobias Hunger
c4bdddf917 CMake: Re-generate printsupport
Change-Id: I8c859dad17dbb18694f52c4c87bf20d55f490099
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:39:32 +00:00
Tobias Hunger
2d1bc2dd6f CMake: Re-generate plugins/platforms/offscreen
Change-Id: Ie26bed794881835278f3874e318d00affad8aa05
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:37:14 +00:00
Tobias Hunger
dde95a3bdb CMake: Re-generate plugins/platforms/minimal
Change-Id: I1f5f3e9f2e3ba4505ff3c9572223ca9d2b043a0e
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:37:01 +00:00
Tobias Hunger
dba2cc84ae CMake: Re-generate plugins/bearer/networkmanager
Change-Id: I70ef85e4c758d76c23012da981c6f583c179dd02
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:36:51 +00:00
Tobias Hunger
107dc7568e CMake: Re-generate plugins/bearer/connman
Change-Id: I68f81b269573e2beaa7fce33adee9c090fae318a
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:36:42 +00:00
Tobias Hunger
9e37f8844b CMake: Re-generate plugins/bearer/generic
Change-Id: I1962b813ab64ac7d577d8645239e9bd0f1140947
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:36:31 +00:00
Tobias Hunger
dfe734567c CMake: Re-generate plugins/sqldrivers/odbc
Change-Id: I95184ab2202f2fd1d87a7182303549557a6cdd87
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:36:18 +00:00
Tobias Hunger
a660bf9aa3 CMake: Re-generate plugins/sqldrivers/psql
Change-Id: If02ae8f616600d49cbbcd2aee298395d03b68a8f
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:36:05 +00:00
Tobias Hunger
4a9ea61705 CMake: Re-generate platformsupport/graphics
Change-Id: Ib144f7ab7d73e408fb73e1c52e92d03377c890c5
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:33:22 +00:00
Tobias Hunger
ff15f36812 CMake: Re-generate platformsupport/glxconvenience
Change-Id: I1a8c376df4a29ca6d38f60b20a961a8706f246ba
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:33:10 +00:00
Tobias Hunger
4cf7ec0665 CMake: Re-generate platformsupport/platformcompositor
Change-Id: I4efe3cc2920c0efe83f8e2b7028020558a78c778
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:33:00 +00:00
Tobias Hunger
b7d3bb8c3a CMake: Re-generate platformsupport/eglconvenience
Change-Id: I0e159dad3efc812be7fad7637901822f9a29fb88
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:32:50 +00:00
Tobias Hunger
95142af5bd CMake: Re-generate platformsupport/kmsconvenience
Change-Id: If0d734f80f3c6252c6cd7dedcba77352ee909178
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:32:39 +00:00
Tobias Hunger
49777d0d4f CMake: Re-generate platformsupport/vkconvenience
Change-Id: I231274316f1cd834ec6d34e51231829dd825643b
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:32:30 +00:00
Tobias Hunger
3b362e766f CMake: Re-generate platformsupport/windowsuiautomation
Change-Id: I5c422b0052af0570de4331215fe78a7e956649e9
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:32:20 +00:00
Tobias Hunger
eb1e744206 CMake: Re-generate platformsupport/fontdatabases
Change-Id: I20e7043c77fbbbd882d6bf8cb0a05dfb32eb2ede
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:31:57 +00:00
Tobias Hunger
03a64ab80d CMake: pro2cmake.py: Handle QDBUSXML2CPP_*_HEADER_FLAGS
Change-Id: Ib5d34a6bf550a11154109064e4e718d0c79c722b
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:29:47 +00:00
Tobias Hunger
75658794e4 CMake: pro2cmake.py: Improve handling of dbus interfaces/adaptor sources
Change-Id: I3b642e1ae31996a81618e312183f4cc168bbbe1b
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:29:29 +00:00
Tobias Hunger
b9a3217c41 CMake: pro2cmake.py: Handle $$PWD better
Change-Id: I2e28b652c60d3490138ae0548b32d010faccc5a4
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:28:51 +00:00
Tobias Hunger
6a834a0c59 CMake: Map odbc to ODBC::ODBC
Change-Id: I55cf506cca87ac3e3fe9e0e1803f5118b46bf818
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:27:43 +00:00
Tobias Hunger
b0d4ac8498 CMake: Map SQLite3 to SQLite::SQLite3
Fix sqlite maping while at it.

Change-Id: I712ca562fa362a7f5857047346e8b3083f901bfb
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:27:29 +00:00
Tobias Hunger
1ac36d4bc2 CMake: Map glx_support and glx_supportPrivate
Change-Id: I777ea84a080a6856961d644a0290e4d73e07c518
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:27:13 +00:00
Tobias Hunger
61ec3d0b6e CMake: Map psql to PostgreSQL::PostgreSQL
Change-Id: I8332d2120e8b629c8722b5c9a95b47950b327d4c
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:26:58 +00:00
Tobias Hunger
828f2965e7 CMake: pro2cmake.py: deduplicate and sort libraries
Change-Id: I924cfac365a0b4ba18c2579820bc37729f1ea8d9
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-03-29 14:06:41 +00:00