Commit Graph

896 Commits

Author SHA1 Message Date
Lars Knoll
f2f32b88b8 Move qsimd* from corelib/tools to corelib/global
It's not used in tools at all and fits a lot better in global.

Also fix the qsimd_x86* files to have a proper copyright
header.

Change-Id: Id3d8e7cfcd7769a1ca9f3d8cf6d357a31a99ba40
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-26 09:15:32 +01:00
Leander Beernaert
b6446a5ffa CMake: Fix exception in pro2cmake about missing v1 api
This patch silences the exception about missing v1 api entry for the
qt_add_3rdparty_library() function.

Change-Id: I74a473ed1c063b13f0a9ca64dcb568b8f8b27235
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-25 17:00:27 +01:00
Leander Beernaert
8dcf7d2674 CMake: Add support for bundled SQLite library
Change-Id: I4d3f6e3bf04eb2fcf337e2c5dbc04b6e6f8ebe0b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-25 13:52:05 +01:00
Leander Beernaert
f716a87352 CMake: Fix configuration of FEATURE_JPEG
Without this patch JPEG support is always disabled, even though we can
build it from 3rdparty sources.

Change-Id: I9e619f0ca8ec3ca3e7c58981bb6af9b33426a029
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-25 10:51:55 +01:00
Joerg Bornemann
7e4361ffbd CMake: "Port" the c89, c99 and c11 features
We can ignore the tests for those features and directly ask CMake
whether the compiler supports the respective language version.

Change-Id: I31cd35493443fea0c6d0b0a5e641768c3bcbe736
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-23 16:42:59 +01:00
Alexandru Croitor
e4efd56637 CMake: pro2cmake: Consider system-assimp for conditions
Change-Id: Idee55dfdd88b04792dc1485a818ab41218fa2707
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-03-23 09:55:05 +01:00
Leander Beernaert
3c2aa878dc CMake: Skip inclusion of selfcover.pri
Do not process selfcover.pri in the conversion as the output requires a
lot of special case fixs ups.

Change-Id: Iebee484db887973369b5604344a6d486f4bea20b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-19 12:52:09 +01:00
Alexandru Croitor
ab60f32d6f CMake: Don't use GUI for tests that use QT += testlib-private
Change-Id: I90cac19928d6e6e30214a6480a5855479a8d4d77
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-03-19 12:47:50 +01:00
Mitch Curtis
8185da097a CMake: pro2cmake: Add alternative package installation instructions
I kept getting

Ignoring pytest: markers 'python_version >= "3.7"' don't match your environment

when using the pip command, but this alternative worked.

Change-Id: Ibfc7f36de04153d2247f8f62bd129b0c0c723bf2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-18 14:44:10 +00:00
Alexandru Croitor
f66a5c2d61 CMake: pro2cmake: Handle javascript files not present in qmldir
If a file is present in a QML_FILES variable inside a qmake .pro
file, but is not listed in the static qmldir file, mark the file
so no qmldir entry created for it.

Change-Id: I3ec77b6eedf70ea9124bf7f447ee3477204bc4f7
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-17 09:18:05 +01:00
Alexandru Croitor
605a36800f CMake: pro2cmake: Handle system tiff feature
Don't exclude it, because we use it in qtimageformats.

Change-Id: I0004830580dd9711cf7a5bd934ecd5a7f9036800
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-03-17 09:18:01 +01:00
Simon Hausmann
c2f167b412 Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-03-16 20:43:50 +01:00
Simon Hausmann
ff922e7b87 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/kernel/qmetatype.cpp

Change-Id: I88eb0d3e9c9a38abf7241a51e370c655ae74e38a
2020-03-16 18:41:27 +01:00
Tor Arne Vestbø
77885f8402 cmake: Remove APPLE prefix from platform names
None of the other platforms have it.

Change-Id: Ib448c2c03ba03f711b507ef391977c0e6aa7c192
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 17:57:56 +01:00
Tor Arne Vestbø
db745fdd2d cmake: Fix naming when referring to Apple macOS
Change-Id: Iafb5e448d0d65d42f788464fc600594a5666f9af
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 17:57:52 +01:00
Edward Welbourne
ebcd8e16db Deduplicate day-name data in QLocaleXML files
This is a follow-up to commit ebb0212133.
The day name data appeared twice in the XML files.
Skip the second copy, saving 8.8% of the intermediate file-size.
This makes no change to generated QLocale data.

Change-Id: Ic2cc543a2a85cbb1d2d47ebac7df4fa9ad6ee0a7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-16 08:51:46 +01:00
Edward Welbourne
54f8be6cc0 Update UCD to Revision 26
Include WordBreakTest.html, since a test uses sample strings from it,
albeit without actually reading the file.

Had to comment out more of the new tests, as at Revision 24, pending
an update to harfbuzz and the text boundary detection code.

Task-number: QTBUG-79631
Task-number: QTBUG-79418
Task-number: QTBUG-82747
Change-Id: I0082294b09d67ffdc6a9b5c15acf77ad3b86f65f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-14 11:26:59 +01:00
Leander Beernaert
a5ec9bea63 CMake: pro2cmake handle ${QT_SOURCE_TREE} for include statements
Replace ${QT_SOURCE_TREE} with top level project directory when
encountered in include statements.

This is required to parse tests/auto/testlib/selftests/test/test.pro.

Change-Id: I80f31142cf5a35441d1424c38e21bb097e44cd0f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-12 16:30:46 +01:00
Alexandru Croitor
d4018dac8b CMake: Reformat the python scripts using black
Change-Id: I1e2eba46eb7c9dfefd267be91790be7898634c3a
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-12 11:41:53 +01:00
Alexandru Croitor
d2419b0d8c CMake: pro2cmake: Handle LIBS_SUFFIX define correctly
Matches the LIBS_SUFFIX define we use in Android conditions
and replaces it with a sane amount of escaped characters.

Change-Id: I7d870f992c70b105dd80b6fa94f87d3fa5644006
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-12 11:41:29 +01:00
Alexandru Croitor
f46c11989a CMake: pro2cmake: Fix opengles condition substitution
Missing parenthesis caused wrong condiiton simplification in scopes.

Change-Id: Ia2a1a97f4da36b185631a2a3c7855ae01595b0f7
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-10 07:33:27 +01:00
Alexandru Croitor
02f08d5038 CMake: Remove old 3rdparty mechanism for harfbuzz-non-ng
Change-Id: I37c1e561ac83c51a06aae50ccb176094785d52f5
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-10 07:33:13 +01:00
Alexandru Croitor
729a73a9cf CMake: Remove old 3rdparty mechanism for double conversion
Change-Id: I2b20d4d9d95a1f7f59bc506046a1ebc20eb305f7
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-10 07:33:07 +01:00
Alexandru Croitor
d71545e115 CMake: Add python version requirement note to pro2cmake
Change-Id: Iccaf61e19fb7257ed21f656c287976d7d778ed1c
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-03-09 23:09:29 +01:00
Alexandru Croitor
d0400b1cb8 CMake: Disable framework builds on macOS when target config is Debug
This prevents Coin from trying to automatically enable the framework
feature when no configuration is specified on the command line.

By default if no configuration is specified, and there's a .git
subfolder, "Debug" will be the chosen config, and that would conflict
with the framework feature, which would cause configuration to fail.

Change-Id: Ia9db3e8178794737692307b4662a2e77cc574ccd
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-03-09 23:09:12 +01:00
Alexandru Croitor
28fff4a551 CMake: Fix handling of QML_IMPORT_VERSION in pro2cmake
Change-Id: Iaab6796204a6bb13b3d061d2589b2aebd4f342a8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-03-09 23:09:07 +01:00
Alexandru Croitor
95e1469eb8 CMake: Port most of the configure summary support
Teaches configurejson2cmake about summaries / reports, so things
like enabled features, configure sections, notes, etc.

Add relevant CMake API for adding summary sections and entries,
as well as configure reports. The commands record the passed data,
and the data is later evaluated when the summary needs to be printed.
This is needed, to ensure that all features are evaluated by the
time the summary is printed.

Some report and summary entries are not generated if they mention a
feature that is explicitly exclduded by configurejson2cmake's feature
mapping dictionary. This is to prevent CMake from failing at configure
time when trying to evaluate an unknown feature. We should re-enable
these in the future.

A few custom report types are skipped by configurejson2cmake (like
values of qmake CONFIG or buildParts).
These will have to be addressed a case-by-case basis if still needed.

Change-Id: I95d74ce34734d347681905f15a781f64b5bd5edc
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-03-09 23:08:57 +01:00
Joerg Bornemann
d0911d0a92 CMake: Port the 'separate_debug_info' feature
For this, we have to uninline the separate_debug_info configure test,
because supporting the conversion of this in configurejson2cmake is not
worth the hassle.

Separate debug information can be turned on for a target by calling the
function qt_enable_separate_debug_info. For Qt's shared libraries and
tools separate debug information is generated if the
'separate_debug_info' feature is manually turned on.

Change-Id: Ic2ffc15efef3794dc0aa42f3d853ef6d651a751c
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-06 13:38:37 +01:00
Joerg Bornemann
a3d0ef019a CMake: Fix condition of the 'debug' feature
For the moment, in feature conditions that use STREQUAL, the lhs must be
a variable.

Change-Id: I56fe24baeb8067662ea81984fd48383da4c5b67b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-06 13:38:13 +01:00
Leander Beernaert
8ffb9053ad Handle configure.json library tests
This patch updates configurejson2cmake.py to generate compile tests for
library entries. The test also support the inherit keyword, which is
currently limited to one level of inheritance.

LibraryMapping has been extended with a test_library_overwrite as a
means to overwrite the mapped library during a compile test. Certain
tests such as openssl_headers form src/network are mapped with *_nolink
libraries which do not exist when the test is run. Failing to do so will
cause the test to run as it is skipped when the library target isn't
found.

To avoid redundant checks, the library tests need to be opt in by
setting run_library_test to True on an instance of LibraryMapping.

Change-Id: I607b24eda389fa67afad301c616e31bb7ab38d20
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-06 12:32:48 +01:00
Joerg Bornemann
1057d568bb configurejson2cmake: Fix non-inline compile tests
If there's no test dir set, use "config.tests" as default value, and
perform the check for the existence of CMakeLists.txt in
configurejson2cmake, not the configure.cmake file.

Change-Id: I8d3be8f2b68767c7592665c374022353c2dc6c57
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-05 07:48:20 +01:00
Joerg Bornemann
343865201a configurejson2cmake: Fix compile tests without a "test" entry
Set the default value of the "test" entry to the test's name like the
qmake-based configure does.

Change-Id: Ic1027c54c6312c47dca241dd7e3dc65b3e35d36f
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-05 07:48:16 +01:00
Joerg Bornemann
b99321b78b CMake: Port the 'force_debug_info' feature
This feature is read-only and is ON if CMAKE_BUILD_TYPE is RelWithDebInfo
or if that value is in CMAKE_CONFIGURATION_TYPES.
It mainly exists for the qmake support.

Change-Id: I25cb57e832dcfcab100834a104b1a3d34f01086b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-05 07:48:11 +01:00
Joerg Bornemann
46a2366d12 CMake: Port the 'debug_and_release' feature
This feature is read-only. It's controlled by the multi-config feature
of CMake. It mainly exists for the qmake support.

Change-Id: I322459598fe92568eda4d42319ded444537e95d4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-05 07:48:06 +01:00
Joerg Bornemann
20410cdc11 CMake: Port the 'shared' feature
This feature is read-only and supposed to be set by BUILD_SHARED_LIBS.
It mainly exists for the qmake support.

Change-Id: I722b0de53211d0aab1924e45a77120c890f31f50
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-05 07:48:01 +01:00
Joerg Bornemann
becbd07f55 CMake: Port the 'debug' feature
This feature is read-only and supposed to be set by variables like
CMAKE_BUILD_TYPE. It mainly exists for the qmake support.

Change-Id: Ic7e32cbda0f3c2d92dd446b07a3bf1a8d85ec3b9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-05 07:47:56 +01:00
Lars Knoll
a0ffdf765e Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-03-04 19:10:37 +00:00
Alexandru Croitor
d50b22e75d CMake: Remove incorrect hardcoded harfbuzz condition
The non-system harfbuzz feature doesn't actually have a condition
in the json file.

Change-Id: I4b74915f28da97d6ef8f89690e91306d243913ee
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-03-04 16:16:27 +00:00
Joerg Bornemann
1a30a82830 CMake: Fix stack-protector-strong test and feature
And in order to do this we must teach qt_config_compile_test a
COMPILE_OPTIONS argument.

Change-Id: I66fa45142b544e3a2fc599af1c1a4c69b442b318
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-04 16:31:13 +01:00
Lars Knoll
2a4b957789 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I99ee6f8b4bdc372437ee60d1feab931487fe55c4
2020-03-04 14:39:18 +00:00
Qt Forward Merge Bot
63312fe2ec Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: If36d96c0fef3de5ab6503977501c55c62a2ecc97
2020-03-03 14:13:02 +01:00
Edward Welbourne
84382bde5c Rename the localexml module to qlocalexml
It implements interaction with the QLocaleXML file format type, so
rename it to match.

Task-number: QTBUG-81344
Change-Id: I46302d4ac1038cdfc5929e73b554b6d793814c56
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-03 07:38:06 +01:00
Edward Welbourne
54413653d5 Rename the endonym members of the Locale type
All other members had camelCase names, but the endonyms had
prefix_endonym names, requiring munging where they were emitted to
XML. So just do that munging upstream in the attribute name of the
Locale objects. Makes no change to the data output by the scripts, not
even to the intermediate QLocaleXML file.

Task-number: QTBUG-81344
Change-Id: I01c15a822216281dc669b3e7ebda096d18b04f9b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-03-03 07:38:06 +01:00
Edward Welbourne
305ddbeb5b Use Qt::SplitBehavior in preference to QString::SplitBehavior
The Qt version was added in 5.14 "for use as eventual replacement for
QString::SplitBehavior." Move another step closer to that goal.

Change-Id: I399b5ea56e9255e775ca1746632f7421519a6616
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-02-28 15:37:11 +01:00
Edward Welbourne
b6fad7588a Correct pro2cmake's Requirements message
It only told me about two packages to install, so I got an error after
I'd installed them and ran it, because I hadn't installed the
rest. Save the next person an extra round-trip.

Change-Id: I8b544fc2637b86656ec2adddce8e95e6e9e1daf5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-28 10:47:36 +01:00
Johan Klokkhammer Helsing
9f041c4f3b glgen: Fix endl warnings
Change-Id: Ibb4fd83778a5d6c00cabae55c14ba3e771345aef
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-02-28 09:59:53 +01:00
Joerg Bornemann
119ffd4781 CMake: Port the reduce-relocations feature
As reduce-relocations implies bsymbolic_functions, we also add the
-Bsymbolic-functions linker flag.
Also, handle the .dynlist files that are passed to the linker by
bsymbolic_functions.prf in the qmake build.

Change-Id: I535c33fba888596d2f8975b16864bbe9f0a7caa4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-25 15:47:50 +01:00
Alexandru Croitor
26059d1b9b CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that:

- the python scripts do not ignore certain system_foo features anymore
  (it is a hardcoded list for now just to be safe)

- configurejson2cmake now outputs
  qt_find_package(WrapSystemFoo) calls for bundled libraries
  (see below)

- the harfbuzz .pro file is modified to accommodate pro2cmake
  not being able to correctly parse some conditional scopes

- the freetype .pro file is modified to make sure linking of the
  library succeeds without duplicate symbol errors, which qmake
  doesn't encounter due to magical exclusion of cpp files that are
  included in other cpp files (presumably for include moc_foo.cpp
  support)

- feature evaluation for Core, Gui, Network now happens in the
  qtbase/src directory, so that bundled libraries can be conditionally
  built

- for each bundled library there are now two FindWrap scripts:
  - FindWrapSystemFoo which finds an installed library in the system
  - FindWrapFoo which either uses the system installed library or
    the built bundled one depending on a condition

- projects that intend to use bundled libraries need to link against
  WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets
  (this is handled by pro2cmake).
  Unfortunately manually added qt_find_package(WrapFoo) calls might
  still be needed as is the case for WrapFreetype and others.

- a new cmake/QtFindWrapHelper.cmake file is added that provides
  a macro to simplify creation of WrapFoo targets that link against
  a bundled or system library. The implementation is fairly ugly
  due to CMake macro constraints, but it was deemed better than
  copy-pasting a bunch of almost identical code across all
  FindWrapFoo.cmake files.

- a qtzlib header-only module is now created when using bundled
  zlib, to provide public syncqt created headers for consumers
  that need them. These are projects that have
  'QT_PRIVATE += zlib-private' in their .pro files
  (e.g. qtimageformats, qtlocation, qt3d, etc.)
  This is unfortunately needed due to QtNetwork using zlib
  types in its private C++ API.

The change includes support for building the following bundled
libraries:
- zlib
- libpng
- libjpeg
- Freetype
- Harfbuzz-ng
- PCRE2

The following 3rd party libraries are still using an old
implementation within the CMake build system, and should be migrated
to the new one in the near future:
- double-conversion
- Old harfbuzz

The are a few libraries that are not yet ported:
- system-sqlite
- systemxcb
- maybe others

Among other things, this change allows building qtbase on Windows
without requiring vcpkg.

Task-number: QTBUG-82167
Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-25 15:43:16 +01:00
Alexandru Croitor
160184d6a5 CMake: Fix X11 and xkb library usage in the platform projects
This is a prerequisite for building the bundled 3rd party libraries.

Because the feature evaluation will be moved into src/CMakeLists.txt,
some of the X11 packages were found in the src dir, and then a second
time inside the x11-related projects.
These qt_find_package calls in the x11 related projects tried to
promote the imported targets to global, which failed, because they were
created in a different directory scope.

To avoid this, the special case qt_find_package calls are removed from
the nested projects.

Also, fix the mapping of some of the x11 libraries to be correct
- xkbcommon_x11 was incorrectly mapped to XKB::XKB instead of the
  xkb common x11 library
- xlib was mapped to xcb, whereas X11 is the correct CMake target

Change-Id: I30781b2ecbdd478c98419b14baa0492037e49c61
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-25 15:43:16 +01:00
Frederik Gladhorn
e3c4870feb Do not try to find .qmake.conf past the root directory
In case of .qmake.conf not existing, this would result in an infinite loop.

Change-Id: I577aaed7a502efb7b01dc6b199dcf464358bf5a9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-21 16:04:19 +01:00
Timur Pocheptsov
4f076db3d2 Remove QUrl::topLevelDomain
And move the actual implementation from corelib/io to network/kernel
sub-module.

Fixes: QTBUG-80308
Change-Id: I554b05bae3552c68e1e1a405c169366ee19120b2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-02-20 21:41:54 +01:00
Johan Klokkhammer Helsing
00eeed234f Move QOpenGLWidget from QtOpenGL to its own module
Same pattern as QtQuickWidgets. Gets rid of QtOpenGL's dependency on QtWidgets.

Task-number: QTBUG-74409
Change-Id: I4f9b55c23e25a1e0519734037b768a16e870c7d2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-02-18 09:22:51 +01:00
Edward Welbourne
c8e00e4f73 Use char16_t in favor of ushort for locale data tables
Change-Id: I890dd2b52c1b786db1081744c8ca343baba93de4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-17 14:55:42 +01:00
Edward Welbourne
ed2b110b6a Allow surrogate pairs for various "single character" locale data
Extract the character in its proper unicode form and encode it in a
new single_character_data table of locale data. Record each entry as
the range within that table that encodes it. Also added an assertion
in the generator script to check that the digits CLDR gives us are a
contiguous sequence in increasing order, as has been assumed by the
C++ code for some time. Lots of number-formatting code now has to take
account of how wide the digits are.

This leaves nowhere for updateSystemPrivate() to record values read
from sys_locale->query(), so we must always consult that function when
accessing these members of the systemData() object. Various internal
users of these single-character fields need the system-or-CLDR value
rather than the raw CLDR value, so move QLocalePrivate's methods to
supply them down to QLocaleData and ensure they check for system
values, where appropriate first.

This allows us to finally support the Chakma language and script, for
whose number system UTF-16 needs surrogate pairs.

Costs 10.8 kB in added data, much of it due to adding two new locales
that need surrogates to represent digits.

[ChangeLog][QtCore][QLocale] Various QLocale methods that returned
single QChar values now return QString values to accommodate those
locales which need a surrogate pair to represent the (single
character) return value.

Fixes: QTBUG-69324
Fixes: QTBUG-81053
Change-Id: I481722d6f5ee266164f09031679a851dfa6e7839
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-02-17 14:55:24 +01:00
Alexandru Croitor
c53ee1f054 Merge remote-tracking branch 'origin/wip/cmake' into dev
Conflicts:
	tests/manual/rhi/hellominimalcrossgfxtriangle/CMakeLists.txt

Hopefully final merge from wip/cmake, and then all cmake changes
should target dev directly.

Change-Id: I29b04c9b0284e97334877c77a32ffdf887dbf95b
2020-02-13 23:29:51 +01:00
Liang Qi
6b2535ea15 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/widgets/graphicsview/boxes/scene.h
	src/corelib/Qt5CoreMacros.cmake
	src/corelib/Qt6CoreMacros.cmake
	src/network/ssl/qsslsocket.cpp
	src/network/ssl/qsslsocket.h
	src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp
	src/testlib/CMakeLists.txt
	src/testlib/.prev_CMakeLists.txt
	tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp

Disabled building manual tests with CMake for now, because qmake
doesn't do it, and it confuses people.

Done-With: Alexandru Croitor <alexandru.croitor@qt.io>
Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
2020-02-13 18:31:40 +01:00
The Qt Project
f4a52b79ce Merge "Merge remote-tracking branch 'origin/dev' into wip/cmake" into wip/cmake 2020-02-12 08:47:47 +00:00
Leander Beernaert
99da0c164b Use INSTALL_QMLDIR instead of Qt6_DIR for qmltypes properties
Change-Id: Ic7e6230656670ebe925530eea5e34b16b6fea59b
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-12 08:45:38 +00:00
Mårten Nordheim
f126d44db6 Add library mapping for QtShaderTools
Change-Id: Ideefd13d75bdd4e0463c0f7b1e15c0781cfffe8c
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-12 08:44:51 +00:00
Leander Beernaert
572c03eb7a Add support for qt_helper_lib()
Add qt_add_3rdparty_library() function as a replacement for qmake's
qt_helper_lib feature.

All 3rdparty libraries will be available under the Qt:: alias when built
through this method so that they can properly register as dependencies
of a Qt module.

This patch also adds Qt3rdPartyLibraryConfig.cmake.in to export the
CMake configuration for static builds and shared libraries.

Change-Id: I52bf3a95ca22fccd9ab54343468847bb1b570c28
Fixes: QTBUG-81969
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-12 08:43:29 +00:00
Alexandru Croitor
3af9d49bb7 Merge remote-tracking branch 'origin/wip/cmake' into dev
Change-Id: If75ae006db6eb977cf66af4c3d36cb5c8098a1f1
2020-02-10 18:35:07 +01:00
Mårten Nordheim
360d9fba23 Use posixpath when generating relative path
Fixes generating some paths with the backslash in the beginning

Change-Id: Ic7705d61f9362d3b854b2eb95f95a8951beca72d
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-02-07 13:57:59 +00:00
Mårten Nordheim
b14ee53a08 Add necessities for qtquick3d
Change-Id: I39aadda7ed2b088a475ba5f940d1cb65b5b62f94
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-06 13:22:34 +00:00
Alexandru Croitor
c5b61d2e90 pro2cmake: Handle QT += core-private correctly for modules
If a module project (Quick) contains QT += core-private, the
qmake semantics translated to CMake would mean the following:

target_link_libraries(Quick PUBLIC Core)
target_link_libraries(Quick PRIVATE CorePrivate)
target_link_libraries(QuickPrivate INTERFACE CorePrivate)

Whereas a QT_PRIVATE += core-private only means
target_link_libraries(Quick PRIVATE CorePrivate)

without adding any public dependencies to QuickPrivate.

To achieve that, we need a few modifications to both pro2cmake and
QtBuild.cmake

- pro2cmake doesn't automagically add public and private dependencies
  to targets when encountering a private module assigned to QT.
  Instead it generates the logic described above by passing correct
  LIBRARIES, PUBLIC_LIBRARIES, and PRIVATE_MODULE_INTERFACE values.

- pro2cmake doesn't do any dependency magic for non-module targets
  anymore, like executables, plugins, internal_modules. This means
  that QT assignments are now regular public dependencies.

- qt_add_module and qt_extend_target now accept a new
  PRIVATE_MODULE_INTERFACE option.

- qt_extend_target does not automagically make private modules be
   public dependencies on other private modules.

- qt_extend_target correctly assigns PRIVATE_MODULE_INTERFACE values
  to Private module only. For other target types, it's a no-op.

The change requires regeneration of all projects.

When we fix pro2cmake and QtBuild.cmake to properly handle
internal_modules (create only Private modules without creating
a non-Private counter part), we will need another project regeneration
to correctly assign dependencies.

Change-Id: I4c21f26b3ef3b2a4ed208b58bccb65a5b7312f81
Task-number: QTBUG-81780
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-05 14:36:16 +00:00
Qt Forward Merge Bot
97417e8f28 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	.qmake.conf
	examples/widgets/widgets/imageviewer/imageviewer.cpp
	src/corelib/text/qchar.cpp
	src/corelib/time/qdatetime.cpp

Change-Id: I9762f5c4ff650799219729d6aee79ac07ce9024a
2020-02-04 10:44:00 +01:00
Alexandru Croitor
4e7af2061e Merge remote-tracking branch 'origin/wip/cmake' into dev
This pulls the CMake port, which not only adds CMake files but also
modifies existing code. A brief summary of "seemingly unrelated" changes:

    * configure.json was re-formatted to not use multi-line strings. That
      is an extension of the Qt JSON parser but not JSON compliant, which
      is needed for the configure.json-to-cmake conversion script (python).
    * Some moc inclusions were added due to CMake's slightly different way
      of handling moc. With the changes the files build with qmake and cmake.
    * Since CMake just grep's for the Q_OBJECT macro to determine whether to
      call moc (instead of doing pre-processing like qmake), the existing use
      of "Q_OBJECT" in our documentation was changed to \Q_OBJECT, which cmake
      doesn't see and which is now a qdoc macro.
    * QTestLib's qFindTestData was extended to also search in the source
      directory known at build time.

What this change also brings is a new way of building modules in Coin by using
YAML configuration files that describe the steps of building and testing in Coin
specific terms. The platform configuration files in qt5 are instructed to use the
old Coin built-in way of testing ("UseLegacyInstructions" feature) but for any
configurations that do not have this, these yaml files in the coin/ sub-directory
are used and shared across repositories.

Change-Id: I1d832c3400e8d6945ad787024ba60e7440225c08
2020-02-03 15:01:53 +00:00
Edward Welbourne
71fa90a37c Enable system locale to skip digit-grouping if configured to do so
On macOS it's possible to configure the system locale to not do digit
grouping (separating "thousands", in most western locales); it then
returns an empty string when asked for the grouping character, which
QLocale's system-configuration then ignored, falling back on using the
base UI locale's grouping separator. This could lead to the same
separator being used for decimal and grouping, which should never
happen, least of all when configured to not group at all.

In order to notice when this happens, query() must take care to return
an empty QString (as a QVariant, which is then non-null) when it *has*
a value for the locale property, and that value is empty, as opposed
to a null QVariant when it doesn't find a configured value. The caller
can then distinguish the two cases.

Furthermore, the group and decimal separators need to be distinct, so
we need to take care to avoid cases where the system overrides one
with what the CLDR has given for the other and doesn't over-ride that
other.

Only presently implemented for macOS and MS-Win, since the (other)
Unix implementation of the system locale returns single QChar values
for the numeric tokens - see QTBUG-69324, QTBUG-81053.

Fixes: QTBUG-80459
Change-Id: Ic3fbb0fb86e974604a60781378b09abc13bab15d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-02-03 15:34:02 +01:00
Johan Klokkhammer Helsing
d8df846631 glgen: Fix compile error
Fixes compile error introduced in ff2b2032a0.

Change-Id: Iee1016f7cf05638db575475c5c0d632f8edb3a8c
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-01-31 14:02:53 +01:00
Edward Welbourne
c08a31634f Separate offsets from sizes in QLocale's data
This enables us to make the sizes quint8 and benefit from the
resulting packing, making the locale data smaller. The sizes for long
month-name lists (which concatenate twelve names with semicolon as
separator) can overflow an 8-bit member, so use quint16 where needed.

Re-ordered the data in QLocaleData and QCalendarLocale. Now all
long-short(-narrow) families arise in that order; and any standalone
is grouped with the one of the same length. (This cost 20 bytes in the
date-format table, which optimises out more duplication if short is
before long, but the saving in the (smaller) time-format table more
than make up for it; and 20 bytes isn't worth the confusion that being
inconsistent in ordering might cause.)

At the same time, drop trailing semicolons from list entries (which
join various names with semicolon) as they're not needed: we know
where the end of the list is, because we know the size of the string
that results from concatenation. The code that parses such lists can
even correctly handle empty entries at the end.

Saves 26 kB of data in the compiled binaries.

Task-number: QTBUG-81053
Change-Id: If6ccc96a6910828817aa605d10fd814f567ae1e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-01-30 17:58:53 +01:00
Edward Welbourne
4e84a8b29f Deduplicate locale data tables
Some entries in tables were sub-strings (e.g. prefixes) of others.
Since we store start-index and length (with no need for terminators),
any entry that appears as a sub-string of an earlier entry can be
recorded without making a separate copy of its content, just by
recording where it appeared as a sub-string of an earlier entry.

(Sadly this doesn't apply to month- or day-names and their
short-forms: for those, we store ';'-joined lists.  Thus, although
each short-form is a prefix of its long-form, the short-form is stored
in a list with other short-forms; and this is not a prefix of the list
of matching long-forms.)

The savings are modest (780 bytes at present), but cost us nothing
except when running the python script that generates the data files
(it takes a little longer now), which usually only happens at a CLDR
update.

Change-Id: I05bdaa9283365707bac0190ae983b31f074dd6ed
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-01-30 17:58:15 +01:00
Edward Welbourne
47d94dab0f Minor tidy-up in qlocalexml2cpp.py
Split a long line.
Use pythonic chained comparison to save some repetition.
Comment on a field not currently in actual use.
Say "zeros" rather than "0s" in one comment to match another.
Added a .h suffix to the main locale data tempfile to match the naming
of the tempfiles used for calendar data.

Simplify generation of the blank line between Language and Script; and
include a matching blank between Script and Country.
This adds one blank line to qlocale.h

Removed a stray space that misaligned locale data lines.
This produces a space-only change in the generated *_data_p.h files.

Change-Id: I974a9e8923c3dfd2178855d2cf1d6a5074e130b3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-01-30 17:56:35 +01:00
Edward Welbourne
d5bb8d5150 Preserve the case of the exponent separator CLDR supplies
We have long (since 4.5.1) coerced it to lower-case, for no readily
apparent, much less documented, reason. CLDR says most locales use an
upper-case E for this - let's actually use what CLDR says we should
use.

The code that matches the exponent separator was doing so
case-insensitively in any case; that needed adaptation now that the
separator's case isn't pre-determined; and, in any case, should have
been done using case-folding rather than upper-casing. In the process,
removed some spurious checks for "'e' or 'E'" in the result, since the
exponent separator is always represented by 'e' (and an 'e' might also
be present for the separate reason of its use as a beyond-decimal
digit representing fourteen).

[ChangeLog][QtCore][QLocale] QLocale::exponential() now preserves the
case of the CLDR source, where previously it was lower-cased.

Change-Id: Ic9ac02136cff79cb9f136d72141b5dbf54d9e0a6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-01-30 17:56:14 +01:00
Alexandru Croitor
ccdc6c2dd3 pro2cmake: Fix flake and mypy issues
Change-Id: I33ab818c53f751ede7a7840b1086a3ae8263e109
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-29 14:42:03 +00:00
Alexandru Croitor
957007a949 pro2cmake: Handle QML_IMPORT_MAJOR_VERSION and minor variants
This is needed for qtdeclarative examples, otherwise CMake configuration
fails due to missing QML import version info.

Change-Id: Iedde7b6a9e2d5ac7f6d81969ac7d6d874361c02e
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-29 14:41:40 +00:00
Edward Welbourne
0ef79d94f6 Ensure we use UTF-8 for the emitted QLocaleXML data file
Python helpfully uses a sensible locale when stdout is a tty but uses
the system (not the filesystem) default encoding, which may be ascii
and unable to encode some of the data we need to save. So brute force
kludge it to ensure sys.stdout.encoding is UTF-8 when writing the
output we'll read as UTF-8 anyway.

Task-number: QTBUG-79902
Change-Id: I218dc0ec4c71a6b1b7181db55b018266d803bc58
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-01-29 15:23:16 +01:00
Leander Beernaert
88b7f64e73 Fix example generation without qmldir file
Do not return when no qmldir file is present and no dynamic qmldir
information is set.

Change-Id: I04e458f69e4e4a6ec9b1e7ca7ba0b0f7520996f7
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-28 20:43:44 +00:00
Alexandru Croitor
3c6b0a07da pro2cmake: Don't set OUTPUT_NAME for qml plugins
Amends f67d8ae2d4

Change-Id: I288a9388d4ebd354199bfa0913eff34d93a58d75
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-27 15:10:16 +00:00
Alexandru Croitor
604aa83ad9 Reformat pro2cmake
Change-Id: I97175e8edbd4b911397f5b03a646006eff32a5bc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2020-01-27 11:49:25 +00:00
Alexandru Croitor
f67d8ae2d4 Fix plugin target names to be compatible with Qt 5
In Qt 5, qmake generates CMake Config files which expose the plugins
as imported libraries. The name of these libraries are derived from
the plugin class name. So QCocoaIntegrationPlugin, and not qcocoa.

To keep compatibility between Qt5 and Qt6 CMake target names,
the pro2cmake script should generate plugin target names based on the
plugin class names.
To avoid passing the same name in qt_add_plugin (target and CLASS_NAME),
derive the class name from the target if the class name is
not explicitly specified.

Also add a new OUTPUT_NAME parameter which is used to change the
final file name of the plugin, so that it's compatible with Qt5.
For example to generate a qcocoa.dylib file, instead of
QCocoaIntegrationPlugin.dylib file.

The same OUTPUT_NAME value will be used for generation of plugin .prl
files for qmake consumption.

Change-Id: I4d53e680d7beb62befecd359cdf6bba60a34ff0d
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-27 11:49:11 +00:00
Leander Beernaert
cce8ada814 Support for QML Type Registrar
Change-Id: Ifc1f44cf40b22c20ab768333ba9d5ce58a5f7250
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-24 12:29:30 +00:00
Leander Beernaert
502d3d6744 Merge remote-tracking branch 'origin/dev' into merge-dev
Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
2020-01-24 13:17:33 +01:00
Leander Beernaert
b29cb7889a Run make format
Change-Id: If1107aefbfd374d6b664a94b21b9bbb5ed4cc178
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-16 08:41:08 +00:00
Leander Beernaert
99a824bbb7 Do not set OUTPUT_DIRECTORY if it is already set
This can happen in unit tests where a test has TARGET set to "../name",
which requires the target to placed in the parent binary directory.

It is possible to run into a second assignment for OUTPUT_DIRECTORY via
the DESTDIR property (e.g: qdbushmarshall test) which can then result in
two OUTPUT_DIRECTORY values.

However, the first one needs to take precedence or the tests won't
execute properly.

Change-Id: Ib263843fa86c3dd68d92a0989b95f2890335c92d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-16 08:36:43 +00:00
Leander Beernaert
ee5d7facc1 Adjust OUTPUT_DIRECTORY for tests when targets starts with ../
Automatically insert OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../
for each tests that has a target name which starts with ../. To do so we
added the TARGET_ORIGINAL property which does not remove the ../ from
the target name.

Change-Id: I55ba1385aa160610a0ff80ed56ff37a80c3590fa
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-14 13:16:45 +00:00
Leander Beernaert
30af71d7eb Fix CMAKE_CROSSCOMPILING property name conversion
Change-Id: I481043166ce3b0b70834bf63f2a70e84203304e9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-13 09:33:23 +00:00
Giuseppe D'Angelo
5b4b437b30 WebGradients: redo implementation
The previous implementation was *extremely* expensive. It
relied on loading a binary JSON file from resources (which
involved decompressing it), then extracting information out of
it to build a gradient.  Already-loaded gradients were kept in
a local cache, which had to be mutex protected.

Instead, this patch extends the gradient generator to build
static arrays filled with the web gradient data, sitting in
.rodata.

These arrays are used when building QGradient objects with a
web gradient. No explicit mutex protection is necessary, since
accesses will just read from the arrays.

As benefits, this patch removes:

* the binary json representation from QtGui's resources (~4KB
compressed, ~50KB uncompressed)
* the overhead of reading from the JSON for each used web
gradient;
* the startup costs of registering the webgradients in the
resources;
* all the overhead of mutex locking when building such
gradients;
* all the runtime memory allocations to load, parse and cache
the web gradients (including the memory + CPU spike on first
load due to the uncompression of the JSON data, as well as a
couple of deep copies).

Change-Id: If5c3d704430df76ce8faf55ee75ebd4639ba09c4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-12-14 11:31:46 +01:00
Leander Beernaert
6d73b02ace Add library mappings for QtAxContainer and QtWekKitWidgets
Change-Id: I5d5b77e86437f752465bf8ae7c6dd6730b3bf471
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-12-11 11:33:01 +00:00
Leander Beernaert
19e79ca0a4 Add condition mapping for cross_compile to CMAKE_CROSS_COMPILING
Change-Id: I90220eda846299c14aca67ba59a2a9518bea2dee
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-12-11 10:37:57 +00:00
Leander Beernaert
e0205f1793 Add special condition replacement for libclang in qttools
Change-Id: Icf35a2e39307e6239d8704824105bdc6b9081ffd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-12-10 12:37:22 +00:00
Leander Beernaert
ea9c2e558c Add library mapping for QtTools
Change-Id: I59fdad5b56875b965a4831b07b5d8d13f9d7b10f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-12-09 14:42:51 +00:00
Leander Beernaert
0f220d473a Collect Json Metatypes from CMake's Automoc
This patch adds a new bootstrap tool which will read CMake's
AutoGenInfo.json and ParseCache.txt to determine what the current
list of json files is that needs to be passed to moc --collect-json
option.

Right now this is enabled for qt_add_module() with the option
GENERATE_METATYPES. pro2cmake has also been updated to detect qmake's
CONFIG += metatypes and to generate the above option for modules.

The implementation lives in Qt6CoreMacros so it can eventually be used
in the public facing apis.

The generated meta types file is saved under the target property
QT_MODULE_META_TYPES_FILE.

Change-Id: I03709c662be81dd0912d0068c23ee2507bfe4383
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-12-04 10:48:06 +00:00
Alexandru Croitor
461020a86a Export non-private and non-public features and CONFIG values
Before we only exported features that had outputType PUBLIC or PRIVATE
on the various "QT_ENABLED_PUBLIC_FEATURES" target properties.

Now we also export features that have output type privateConfig,
publicConfig and publicQtConfig.

The new properties names are:
- QT_QMAKE_PUBLIC_CONFIG    for outputType == publicConfig
- QT_QMAKE_PRIVATE_CONFIG   for outputType == privateConfig
- QT_QMAKE_PUBLIC_QT_CONFIG for outputType == publicQtConfig

These need to be exported for 2 reasons:
- other modules that need to check the config values
- in preparation for generating proper qmake .prl and .pri
  information for each module

Note that the config values are now considered actual features
when doing condition evaluation. So if there exists a feature "ssse3"
with outputType privateConfig, its enabled state can be checked via
QT_FEATURE_ssse3 in consuming modules (but not in the declaring
module).

These config values are also placed in the respective
QT_ENABLED_PUBLIC_FEATURES, QT_ENABLED_PRIVATE_FEATURES properties
when exporting a target, so the properties will now contain both
features and config values.

In order to make this work, feature name normalization has to happen
at CMake time, rather than done by the python script.

This means that features like "developer-build" need to retain the
dash in the qt_feature(), qt_feature_definition() and
qt_feature_config() calls, rather than generating "developer_build"
as the script did before.

The normalization is done at CMake time. Feature conditions,
CMake code, and -DFEATURE_foo=bar options passed on the command line
should still use the underscore version, but the original name is used
for the QT_QMAKE_PUBLIC_CONFIG properties.

Note that "c++11" like features are normalized to "cxx11".

Implementation wise, the configurejson2cmake script is adjusted to
parse these new output types.

Also QtBuild and QtFeature are adjusted to save the config values
in properties, and re-export them from GlobalConfig to Core.

Task-number: QTBUG-75666
Task-number: QTBUG-78178
Change-Id: Ibd4b152e372bdf2d09ed117644f2f2ac53ec5e75
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-12-03 13:37:56 +00:00
Alexandru Croitor
55a15a1c1b Add initial support for cross-building to iOS
Tested locally with the following configurations:
- iOS device builds (arm64)
- iOS simulator builds (x86_64)
- iOS simulator_and_device builds (fat arm64 and x86_64 archives)

All iOS builds currently require a custom vcpkg fork which contains
fixes for building the required 3rd party libraries.

qtsvg, qtdeclarative, qtgraphicaleffects and qtquickcontrols2
have also been tested to build successfully.

simulator_and_device builds are also supported, but require an umerged
patch in upstream CMake as well as further patches to vcpkg.

Task-number: QTBUG-75576
Change-Id: Icd29913fbbd52a60e07ea5253fd9c7af7f8ce44c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2019-12-03 13:35:59 +00:00
Edward Welbourne
65ea4948dc Unicode tables: minor prettification
Put blank lines before the final Num*Classes entries in enums, to set
them off visibly from the "real" members. Moved some oddly placed
commas to the ends of preceding lines, so that later additions can
just add lines (with comma on end) without having to modify the
preceding line while doing so.

Change-Id: I5188dc25af9e4c17a1882fd9dab070e88013060b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-11-28 11:04:39 +01:00
Edward Welbourne
1a1718b342 Add missing docs for UCD additions at 5.15
Also remove two stray commas pointed out in code-review and some
others noticed on checking for similar.
This amends commit c3eb521a0f.

Change-Id: If20c5146b740defe8d25ff61d399031b5c66ded1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-11-28 11:04:27 +01:00
Alexandru Croitor
2637a1aee2 pro2cmake: Format again
Change-Id: I3c82e6c13d01203bda8ab28dc5cb2f9fe6a0c4c2
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-26 10:59:06 +00:00
Leander Beernaert
1c655fb0fc Post merge fixes
Change-Id: I78d3c9687f99c0a32da04257e297e88ef0b02581
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-25 14:53:27 +00:00
The Qt Project
bc1cae774a Merge "Merge remote-tracking branch 'origin/dev' into wip/cmake" into wip/cmake 2019-11-25 14:49:13 +00:00
Alexandru Croitor
8d35ad8726 Add FindWrapHarfbuzz
Apparently we didn't have a wrap find module for it before. Add one,
and add special support to handle a Gentoo broken Config file which is
exported by an autotools build of harbuzz.

Change-Id: I83cbeb817caf2610104c16713d4eac6ab6f8c63b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-11-25 11:58:02 +00:00
Leander Beernaert
96d6e2276d Add support for DYNAMIC_QMLDIR to pro2cmake
Change-Id: I95575dc352343ec86a6f7cacd7b49521262a9a7a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-25 09:35:17 +00:00
Leander Beernaert
2dcab2b9e0 Fix formatting in helper.py
Change-Id: I8ee2abd27064bfc5bf3f291c2743570d11227fcf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-25 08:39:28 +00:00
Simon Hausmann
4ff9d6d523 Fix pro2cmake formatting
... by running make format.

Change-Id: I523a48abd2c483107f5c16c24daa695fcc0a55e5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-11-23 07:07:45 +00:00
Mårten Nordheim
a640db0180 Add parts needed for QtQuick3D
There is a patch in progress to add mappings for Qt3D, so reuse the old
broken Qt3D mappings, delete the duplicates.

QtOpenGLExtensions is needed, so this patch includes it.

Change-Id: I27896ee88b9e6873c8cd52d86afc330e309e1e14
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-11-22 18:03:20 +00:00
Leander Beernaert
26e8769124 Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: Ifecc2d9db396d783124df8567553ba5f846f30bb
2019-11-19 13:53:21 +01:00
Leander Beernaert
7a6c6da2eb Add more special condition conversions
Handle conversions for QT_NO_CURSOR, QT_NO_TRANSLATION and
qtConfig(opengles.).

Change-Id: Idd930f77e78f235b7997a5083ac7faf630ed9801
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-14 10:36:37 +00:00
Alexandru Croitor
ad98624f74 pro2cmake: Adjust script to generate new CMake API calls
The script can now generate both old style CMake API calls
(add_qt_module), as well as new style (qt_add_module).

The first case is considered api version 1, and the second case
is version 2.

You can force which api version to use for generation using
the --api-version command line argument.

This is useful when you want to regenerate an old project
(one that hasn't switched to new style), to keep the diffs
easier to read.

When no parameter is specified, the script will auto-detect
which api version is used in the existing CMakeLists.txt file
(if it exists), and keep using that, until someone force regenerates
the project with a new api version.

Change-Id: I41e4e6ed5db94ef7220c09b46fc5f12e6613e5d2
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-14 10:22:01 +00:00
Alexandru Croitor
0956e2d990 pro2cmake: Allow limiting the number of projects to convert
Change-Id: I7c06d530cb98cc07e4a618427a7cf7b5c70aa171
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-11-14 09:04:41 +00:00
Alexandru Croitor
ab3bbc9d74 pro2cmake: Fix generic_version_handler not to be greedy
Otherwise in a condition with multiple comparisons, the regexp would
match too many characters, and not extract the correct variable
name. And to be extra safe, match until a comma is encountered.

Change-Id: I29d8344287efca5c5b232006f6bbdf39e6e4ee67
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-13 14:22:09 +00:00
Alexandru Croitor
3919ed58ab Allow passing args from run_pro2cmake to pro2cmake
Change-Id: Ic874d4cd3488903ffec438f5c127b589e6371f7a
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-13 13:35:50 +00:00
Alexandru Croitor
c219aaf4d1 pro2cmake: Reformat code with black
Change-Id: I699031d4a05dad84a0807039dcdba17fd5acf2e3
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-13 13:35:40 +00:00
Alexandru Croitor
2679ae3719 pro2cmake: If CONFIG-=app_bundle consider this a non gui app
Change-Id: I45804af3c43cf1af8b00ac3542e045fe697bf1b6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-13 12:34:28 +00:00
Alexandru Croitor
800cd1d8b9 pro2cmake: Fix broken is_manual_test usage
Amends 681e8b4ead

Change-Id: I5ac8761de10d945b6ac78ba95a179209c80cb893
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-13 10:00:45 +00:00
Leander Beernaert
681e8b4ead Add add_qt_manual_test()
This patch adds add_qt_manual_test() which is a simple wrapper around
add_qt_executable() which does not build under ${CMAKE_BUILD_DIR}/bin
or install the targets.

This could potentially be used later to tag manual tests.

Change-Id: Ic4e0a1d133009f5a858b9394347a0996cf42683f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-12 14:46:44 +00:00
Alexandru Croitor
f33069be24 pro2cmake: Consider _LOADED operations as always processed
To remove wrong unused keys comments from the project file.

Change-Id: Ib52b1738b6136a54f6accb86156b9b2609f331c3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-11-12 14:18:58 +00:00
Alexandru Croitor
a0967c2a4f pro2cmake: Handle operation evaluation order when including children
Instead of processing included_children operations either before or
after the parent scope, collect all operations within that scope and
its included children scopes, and order them based on line number
information.

This requires propagating line numbers for each operation as well as
line numbers for each include() statement, all the way from the
parser grammar to the operator evaluation routines.

This should improve operation handling for included_children
(via include()), but not for regular children (introduced by ifs or
elses), aka this doesn't solve the whole imperative vs declarative
dilemma.

Sample projects where the improvement should be seen:
tests/auto/gui/kernel/qguiapplication and
src/plugins/sqldrivers/sqlite.

This amends f745ef0f67

Change-Id: I40b8302ba6aa09b6b9986ea60eac87de8676b469
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-12 11:47:42 +00:00
Leander Beernaert
026471378d Add mapping entry for LinuxOfonoSupport
Change-Id: I4c88b58cad6b4f4a88f02a38dd84d3a667bcc063
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-12 10:27:51 +00:00
Alexandru Croitor
d7c4fa46ac pro2cmake: Allow skipping subdirs projects via command line
Pass either --skip-subdirs-project to pro2cmake or
--skip-subdirs-projects to run_pro2cmake.

Change-Id: Ic444858f6fc6deb3c893782c0770993aa39d5579
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-12 10:13:24 +00:00
Alexandru Croitor
c1e0e0adb2 pro2cmake: Fix incorrect replacement of x86 conditions
The regular expression used to eat the character that comes after
the x86 token, which was incorrect when matching x86SimdAlways.

Fix the regular expression to use a lookahead with a negative
character class of word characters.

Change-Id: I9ed8f9a490369bf5704b752f8bba3b7118a2cd5b
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-12 10:13:13 +00:00
Alexandru Croitor
4fe8330b5b pro2cmake: Fix formatting and mypy errors
Change-Id: Ic41998c39f5f5b890b3aa8ec43c6f3f03fee54da
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-12 10:13:02 +00:00
Alexandru Croitor
2c66bdde5a pro2cmake: Skip errors regarding not found generated .pri files
A lot of project files include files like qtsqldrivers-config.pri
which do not exist when running pro2cmake. It should be safe to hide
this error messages when converting projects.

Change-Id: I4205010e537f67f9b276b4cb94ec30f847c43c68
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-12 10:12:50 +00:00
Alexandru Croitor
37ab7eae9d pro2cmake: Clean up debug messages
Don't needlessly show a bunch of special case debug messages
unless debugging is enabled.
There used to be a barrage of scary message when using
run_pro2cmake.

Change-Id: I49ab3522e11844a99653034b5f15a634a368d227
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-12 10:12:35 +00:00
Alexandru Croitor
de3a806def Make standalone tests build via top level repo project
Previously repo/tests/CMakeLists.txt was a standalone project on which
CMake could be called. This was useful for Coin to be able to build
and package only tests, but was a bit troublesome because that means
having to specify the usual boilerplate like minimum CMake version,
which packages to find in every tests.pro project.

Instead of having a separate standalone project, modify the top level
project and associated CMake code to allow passing a special
QT_BUILD_STANDALONE_TESTS variable, which causes the top level project
to build only tests, and find Qt in the previously installed qt
location.

This also means that when building a repo, we generate a
${repo_name}TestsConfig.cmake file which does find_package on all the
modules that have been built as part of that repo. So that when
standalone tests bare built for that repo, the modules are
automatically found.

qt_set_up_standalone_tests_build() is modified to be a no-op because
it is not needed anymore. Its usage should be removed from all the
other repos, and then removed from qtbase.

Non-adjusted tests/CMakeLists.txt projects in other repositories
should still be buildable with the current code, until they are updated
to the new format.

Adjust the Coin build instructions to build the standalone tests in a
separate directory.

Adjust pro2cmake to generate new structure for the tests/tests.pro
projects.

Adjust the qtbase tests project.

Fixes: QTBUG-79239
Change-Id: Ib4b66bc772d8876cdcbae1e90ce5a5a5234fa675
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-08 15:42:32 +00:00
Leander Beernaert
942d391b53 Add condition maps for special cases in tests/manual
Change-Id: I426766c68f6f118d0706455689d968534e406d3d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-08 10:27:54 +00:00
Leander Beernaert
706e7fdb0c Add generic lessThan|greaterThan|equal condition map to pro2cmake.py
Change-Id: Ib611aa9a808a05b38a83bd3fd7d95081bdf6e256
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-08 09:56:30 +00:00
Leander Beernaert
512aae3abe Fix Android x86 builds
Replace condition x86 to i386 to match other platforms.

Regenerate src/gui/CMakeLists.txt

Disable SSE4 on android x86 to match qmake.

Change-Id: Ic0d330206f2d70a79d72553aa3ff0f91ff58119c
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-08 09:40:24 +00:00
Qt Forward Merge Bot
78c687f98e Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I963b5f48b5d6f3500ca379fbd7f1a4290b570175
2019-11-08 09:11:02 +01:00
Qt Forward Merge Bot
e3cc16e9fb Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	.qmake.conf
	mkspecs/features/mac/default_post.prf
	src/corelib/tools/qsimd_p.h
	src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
	util/qfloat16-tables/gen_qfloat16_tables.cpp

Change-Id: If48fa8a3bc3c983706b609a6d3822cb67c1352a4
2019-11-06 11:41:19 +01:00
Leander Beernaert
cd9813d276 Add support for benchmark conversion
Convert benchmark executables to add_qt_benchmark().

Currently add_qt_benchmark just calls add_qt_executable() and
ensures that it they build under CMAKE_CURRENT_BUILD_DIR and do not
install.

Add QT_BUILD_BENCHMARKS option to enable/disable building of benchmarks.

Change-Id: Id0bc676698d21d50048d97d9abef51d92ccb6638
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-04 15:48:30 +00:00
Frederik Gladhorn
5c6cf6692e Prevent infinite recursion
In qtvirtualkeyboard/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/src/lipicommon.pri
we have TARGET = $$TARGET$$qtPlatformTargetSuffix which keeps on recursing.

Change-Id: Ia0e020c7258cd87bba9b9681ed7b4568e8f0c9c2
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-01 09:43:12 +00:00
Edward Welbourne
c3eb521a0f Update UCD data to Unicode 12.1.0's Revision 24
Had to teach the update program to accept category Lm as for
Joining_Transparent, for the sake of a new ArabicShaping.txt entry.
Added three new Unicode versions, several new scripts and a new
word-break class.

Updated UCD's test data for tst_QTextBoundaryFinder.  This left 57
tests failing; I have commented out the data rows for those tests,
pending someone with more knowledge addressing this.

Task-number: QTBUG-79631
Task-number: QTBUG-79418
Change-Id: Ic33d3b3551195d47a84d98e84020f57a68f0b201
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-10-30 17:38:02 +01:00
Simon Hausmann
3e5e7b8201 Fix formatting to conform to black rules
Ran make format.

Change-Id: Ib4fc021c30834a69a9a5df653435dd92dc6a9c05
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-29 09:28:26 +00:00
Leander Beernaert
4046b970e7 Add replacement for '*g++*' to pro2cmake.py
Change-Id: I3dc04a6169a98b7ff22392b979e743c41d6e0475
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-28 10:40:46 +00:00
Leander Beernaert
69fb4ae343 Distinguish between qt_plugin and regular plugins
If we do not encounter the load(qt_plugin) statement in the .pro file
but we do see the entry CONFIG+=plugin, treat the target as a regular
CMake library instead of treating it as a qt_plugin by default.

Change-Id: I67ad5c865a1a5ab691a6b0d86c2db4b686aa04dd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-28 09:20:37 +00:00
Edward Welbourne
43f64b4dc8 Update CLDR to v36
Released on October 4th.
Adds Windows names for two time zones, Qyzylorda and Volgograd.
Added languages Chickasaw (cic), Muscogee (mus) and Silesian (szl).

Norwegian number formatting has flipped back to using colon rather
than dot as time separator; it's flipped back and forth over the last
several CLDR releases.  The dot form is present as a variant, the
colon form was long given as the normal pattern, then went away; but
now it's back as a contributed draft and that's what we pick up.

The MS-Win time-zone ID script was iterating a dict, causing random
reshuffling when new entries are added. Fixed that by doing the
critical iteration in sorted order.

Omitted locales ccp_BD and ccp_IN due to QTBUG-69324.

Task-number: QTBUG-79418
Change-Id: I43869ee1810ecc1fe876523947ddcbcddf4e550a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-10-25 11:44:48 +02:00
Edward Welbourne
6852ba815d Correct some references to corelib/tools/ to say corelib/text/
The Unicode data tables moved with QString and friends.
So did the locale data generated from CLDR.

This amends commit a9aa206b7b.

Change-Id: If12f0420b559dcb78993adc00e9f39751bca684a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-10-25 11:44:27 +02:00
Edward Welbourne
a9ac6c89be Compile-fixes in the generator for qurltld_p.h
This is a follow-up to c0ab2ad98f.

Change-Id: Ic05d80fa0561f7609703407cc58a0caccbcb1061
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-10-25 11:43:04 +02:00
Leander Beernaert
d5dc755c65 Convert ANDROID_PACKAGE_SOURCE_DIR for android (pro2cmake)
Change-Id: I76730852e4433d095bc42ff617254a77f2d1bf51
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-23 08:11:47 +00:00
Frederik Gladhorn
f745ef0f67 cmake scripts: do not override local target through includes
This is needed for tests/auto/gui/kernel/qguiapplication which includes
the qcoreapplication test. Without this change, the target name is taken
from the included .pro file, instead of from the current file.

Change-Id: I2d8a207fd70a49ad956fb9a83a59811d89682082
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-23 08:07:54 +00:00
Frederik Gladhorn
61fa61ec16 cmake scripts: do not add spaces in empty lines
When adding resources inside a condition, we'd end up with lines
containing just spaces.

Change-Id: I623203d042e2492bdd72f97d8b9d90517040b0df
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-23 08:07:30 +00:00
Frederik Gladhorn
ccdbd32416 cmake scripts: handle aix-g++
Change-Id: I62b9e9fa9aae3350dc8c668a98453c2373c1a709
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-23 08:07:18 +00:00
Leander Beernaert
58964af094 Handle Library dependencies in compile tests
Update configurejson2cmake.py to also write out the libraries compile
tests depend on.

Change-Id: I22dbc227a33b9b5d39a2198c6ee6062e7e1bf3de
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-21 14:36:35 +00:00
Leander Beernaert
373be4200b Add conversion code for Java code
Add support to pro2cmake to convert java code for android.

Add support to override API_LEVEL for the Android sdk jar file. If the
sdk is not found, we'll default to the one located by QT_ANDROID_JAR.

Change-Id: If0b746dc7f9148ac43e6592a4a4dd23d46bbd4cd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-18 13:20:46 +00:00
Simon Hausmann
2fa23e46c0 Fix C++ standard detection
We cannot use a generator expression in an if statement, it does not
work. Instead, we could inspect the CMAKE_C/CXX_COMPILE_FEATURES list,
but unfortunately that's not reliable. For example it detects that ICPC
supports C++17 when in fact that depends on the installed libstdc++.
Therefore this patch revives our own configure tests.

Change-Id: Ic3bc5762fbe81837722523e3881ac16e84628519
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-17 16:57:25 +00:00
Oliver Wolff
ca33f45d70 Fix message about missing portalocker
Change-Id: Ia82c0aab7c9085eee8a07c4a15485c0804e65e5a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-10-15 12:23:46 +00:00
Leander Beernaert
355a002704 Fix add_qt_resource condition scopes
Calls to add_qt_resource from extend_target were not being wrapped in
a condition scope.

Change-Id: I78cf889fcf4663660fd870bfb93eec90a4ca1c47
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-15 09:07:39 +00:00
Leander Beernaert
1f9d241216 Update android arch condition conversion
Only convert the architectures if they are in a stand alone form. This
means conditions such as 'if(x86 OR x86_64)', 'if(x86)', among others.

This also correctly converts statements such as 'equals(QT_ARCH,x86)'.

Change-Id: I1c3b8580ff9e4077c03a229d894d2bd3d95dba3d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-15 08:06:00 +00:00
Alexandru Croitor
190e9dcdcf Regenerate files after dev -> wip/cmake merge
Note the following bigger things that had to be done:
Handle GSS library / feature with a new custom find module.
Implement rudimentary support for relocatability (does not currently
handle extprefix).

Change-Id: Ic6cd27dda7ebca9829f51cb42ea76fff6d1767ef
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-14 19:01:19 +00:00
Alexandru Croitor
440286655e Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
2019-10-14 17:46:34 +02:00
Simon Hausmann
dcb1253d93 Fix up android architecture suffixing
Don't globally map any variable use of QT_ARCH to ANDROID_ABI, as
that'll break if somebody uses it in a different context. Instead the
CMAKE_SYSTEM_PROCESSOR variable provides a reasonable value and it is
also set by the Android toolchain files.

Change-Id: Ibf203c39db586bbec5b800a365d83b3a509dbb62
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-14 14:38:48 +00:00
Leander Beernaert
6694689a26 Fix Android build from multi-arch qmake changes
Add condition replacements for the android ABIs.

Add a replacement for QT_ARCH to ANDROID_ABI, since QT_ARCH is only used
with the android build for now.

Change-Id: I553d7910546de32236f723ec2e9a05a18da76130
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-14 13:49:40 +00:00