Commit Graph

387 Commits

Author SHA1 Message Date
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
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
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
Tobias Hunger
0c5b63207b CMake: Map atspi2 to PkgConfig::ATSPI2
Change-Id: Ifd21eb278e06a6166ab87106c442d8ec94d92dc5
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 09:33:30 +00:00
Tobias Hunger
2268d171cd CMake: Map tslib, mtdev, libinput and xkbcommen_evdev
Change-Id: If144a8969904b63a3de3884370baaeca1cb4242a
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 09:33:05 +00:00
Tobias Hunger
2b5e3590ca CMake: Map fontconfig to Fontconfig::Fontconfig
Change-Id: I2761ef23cffefbee57da6bb1a07d06b2232d1c57
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 09:32:50 +00:00
Tobias Hunger
f375876d1a CMake: Map libudev to PkgConfig::Libudev
Change-Id: Iac5d0fbf336f0c3905a3dca20524f90432227cf4
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 09:32:34 +00:00
Jędrzej Nowacki
a697df786d Fix exception when parsing tests.pro
The ParseResults may be a nested list of list. Now the code doesn't
raise exceptions, but it fails in do_include as includes that doesn't
provide resolved path will fail. Anyway step in the right direction.

Change-Id: Ice44e4c10d221293cc6c1facca30abd5495791be
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-03-28 13:18:25 +00:00
Jędrzej Nowacki
ce9a143467 Do not overwrite CMakeLists.txt when running run_pro2cmake
One directory may contain many pro files. The generator was happily
generating the same CMakeLists.txt for all of them (overwriting).

This patch implements a different logic. It tries to find the main
pro file and skips others assuming that somehow implicitly they will
be incorporated (for example through SUBDIRS).

Change-Id: Ie07d75e900a96dd48bf981a896c9dfb920f39a23
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-03-28 12:29:44 +00:00
Jędrzej Nowacki
601c840973 Do not validate file existence if path contains variables
We do not need to validate everything, while converting project
files. Some checks can be left to building step.

It fixes some false positive NOTFOUND errors.

Change-Id: I81ff2421fdea13add0bfc03086152a47bce39908
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-03-28 09:29:06 +00:00
Jędrzej Nowacki
89f34ee42a Fix turned logic in RemoveOperation
It is regression caused by a0a94576fa
("Fix RemoveOperation").

Add unit test for all operation types to make sure this code actually
works:-)

Change-Id: I97c94cb3411f05de89422e3fa2222f2217a09e49
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-03-28 06:30:32 +00:00
Jędrzej Nowacki
a0a94576fa Fix RemoveOperation
The operation was using an empty set as a base, so it was not really
functional.

Change-Id: I98fd80c1ede31994857aa1f0c8947ca7b9f76649
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-03-26 11:14:32 +00:00
Jędrzej Nowacki
eb3d73ffb7 Speedup run_pro2cmake
We can use all cores. Sadly it doesn't balance cores well as
corelib.pro takes most of the time anyway, but the speedup is
visible from ~15 to 5 min.

Change-Id: Id8209c58491b38d19c6e9f1163d366c3e33a182c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-03-26 11:10:10 +00:00
Friedemann Kleint
7f635d9777 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I38389a69411f4549fed432f1181dbe23398b34a2
2019-03-26 08:24:59 +01:00
Alexandru Croitor
8158a8767c Temporarily disable the opengles2 feature on WIN32
The feature used to be implicitly enabled because qt source ships with
ANGLE sources, and thus ANGLE could always be built. Yet because the
CMake port of ANGLE is not done yet, and because the feature is
implicitly enabled, the build failed when trying to find GLES headers.

To provide a nicer out-of-the-box configuring of the Windows build,
disable the opengles2 feature on Windows, to default to a desktop GL
build. It can be re-enabled once (if) ANGLE porting is done.

After this change, you shouldn't need to pass any additional custom
FEATURE_foo options to cmake to build qtbase on Windows.

Change-Id: I94c96d8ef70cf671d2ce0198311f70b55fa642b1
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-03-21 21:51:22 +00:00
Alexandru Croitor
ba7c62eed5 Fix sub-architecture (instruction sets / SIMD) handling
In qmake there are at least 2 things to know regarding
sub-architectures and instruction sets.

Which instruction sets does the compiler know to compile for,
represented by the various config.tests and features in
qtbase/configure.json.

And which instructions sets are enabled by the compiler by default,
represented by the configure.json "architecture" test and accessed
via QT_CPU_FEATURES.$$arch qmake argument.

Before this patch there was some mishandling of the above concepts
in CMake code.

The former can now be checked in CMake with via TEST_subarch_foo and
QT_FEATURE_foo (where foo is sse2, etc).

The latter can now be checked by
TEST_arch_${TEST_architecture_arch}_subarch_foo
(where foo is sse2, etc and the main arch is dynamyicall evaluated).

The configurejson2cmake script was adjusted to take care of the above
changes, and the cmake files were regenerated as well.

Change-Id: Ifbf558242e320cafae50da388eee56fa5de2a50c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-03-21 17:47:01 +00:00
Qt Forward Merge Bot
6893919b0c Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/gui/kernel/qplatformintegration.cpp
	src/gui/kernel/qplatformintegration.h
	src/plugins/platforms/wasm/qwasmintegration.cpp
	src/plugins/platforms/xcb/qxcbconnection_screens.cpp

Change-Id: I15063d42e9a1e226d9d2d2d372f75141b84c5c1b
2019-03-20 14:09:30 +01:00
Tobias Hunger
cb7a3aaa4c CMake: pro2cmake.py: Report more qmake variables as used
Report some more qmake variables as used when they are used to decide
which kind of target to write.

Change-Id: Id2602bb8cc07130456c04c53148acb73f21b0f21
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-03-20 10:45:14 +00:00
Tobias Hunger
88549c2855 CMake: pro2cmake.py: Handle "target.path" and "INSTALLS = target"
Add installation location information into CMakeLists.txt files if
available in CMake.

Change-Id: I498deac71b1cc33c7d30790e32da236afdcb23af
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-03-20 10:45:04 +00:00
Tobias Hunger
347261aaf6 CMake: pro2cmake.py: Handle DBUS_*S
Handle DBUS_ADAPTORS and DBUS_INTERFACES and turn them into
equivalent CMake statements.

Change-Id: Ia8a69e7ab97d9f18df93097a6e2c7c1686cb16a3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-03-20 10:44:46 +00:00
Tobias Hunger
d84a2b8274 CMake: pro2cmake.py: Fix typo
Change-Id: I5eebe64f825ab28a67093b1a2cef417ed0908ec0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-03-20 10:44:33 +00:00
Edward Welbourne
c0ab2ad98f Clean up and document the generator for qurltld_p.h
This scans the public suffix list and emits suitable content for the
header.  Made some modest efficiency gains while hopefully making the
code easier to understand.  Check for success when opening files.

Change-Id: If6b25c5c85f86209b33d9188743e820690e7dc05
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-03-19 17:52:09 +00:00
Alexandru Croitor
37b154858f Improve configurejson2cmake feature output generation
There were a few cases of feature outputs that were handled
incorrectly before this change, specifically:
- publicFeatures and privateFeatures with custom names
- privateFeatures that also ended up writing defines into
  public headers
- publicFeatures that ended up in private headers
- internal features (that should have no QT_FEATURE_foo
  defines) that were still written to either public or
  private headers

The change takes care of all those cases by keeping a map
of which features need to be written along with any visibility
specifications, as well as custom name changes.

Change-Id: I37baeaeacdfe4935128a392c72ca71b5c3ca1c8d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-03-18 15:34:33 +00:00
Eskil Abrahamsen Blomfeldt
01380dc267 Remove broken code from unicode generator
The current state produces uncompilable code.

Change-Id: I9a68b61866a4a416335ed4d7204c58122803fb1c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-03-18 15:17:10 +00:00
Eskil Abrahamsen Blomfeldt
e59ba35f1b Wasm: Add workaround for Emscripten compiler again
This work around was added directly to the generated files
at some point, and never to the generator it seems. So to avoid
removing the workaround again when we regenerate the next time,
we need to add it.

Task-number: QTBUG-74511
Change-Id: Ided1bd949234ba82df61c55891646823e7f72e80
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-03-18 15:16:53 +00:00
Tobias Hunger
fbf98bf255 CMake: pro2cmake.py: Better reporting of unused keys from qmake
Change-Id: Ie1b1f446c314bb5248cc13efeae1f279b0182e04
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-03-18 11:38:05 +00:00
Tobias Hunger
6e16f127ad CMake: pro2cmake.py: Handle SIMD sources
Change-Id: Ib445888e769432e8c247ae2d2fb5d8af2d5cd275
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-03-18 11:37:47 +00:00
Tobias Hunger
42ae8218b1 CMake: configurejson2cmake.py: Fix typo
Change-Id: Ib142032577f1d84bfb2402103271db04a4bb25a1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-03-12 08:43:03 +00:00
Tobias Hunger
4b105d77c2 CMake: pro2cmake.py: Remove .qrc files!
Remove qrc files from CMake. Use add_qt_resource function instead.

Change-Id: I64cdbd9498f97d23cd8e03f34ab5ae4a52dba5af
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-03-11 14:52:09 +00:00
Tobias Hunger
66a4267f93 CMake: pro2cmake.py: Map libpng to PNG::PNG
Change-Id: Ia8dd20b777e24e2783bedb0f063db2189e0b7ed3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-03-04 09:09:04 +00:00
Tobias Hunger
a5f51e4898 CMake: pro2cmake.py: Automatically map equals(QT_ARCH, "foo") in conditions
Change-Id: I10d8001ba8330deaa622ef8c499b2b6fe438e28a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-03-04 09:08:57 +00:00
Tobias Hunger
363eccf010 CMake: pro2cmake.py: Handle BOOTSTRAP for add_qt_tool
Add BOOTSTRAP for tools that need it automatically.

Change-Id: I33b2ec16dfcb09709f844ed232ce9974a9d7c7ed
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-03-04 09:08:48 +00:00
Михаил Светкин
3c9d7dfb30 cmake: Cleanup harfbuzz features
Remove system-harfbuzz feature and use harfbuzz feature as system

Change-Id: I441345a667450f1c2d19380b0709911011c7ceb7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-03-01 19:24:50 +00:00
Edward Welbourne
f9421f0968 Adjust chunk-size in TLD-suffix list to placate MSVC 2015
MSVC 2015 has a size limit on strings; sizeof (including the
terminating '\0') must not exceed 0xffff.  The generator for the
suffix-list data worked round this by breaking its data into chunks of
at most 0xffff bytes; however, it was limiting on the strlen, not the
sizeof, so was off by one.  It checked for this before adding each
suffix, so has (until now) always happened to break early enough; but
the latest update gave an exactly 0xffff chunk, whose terminating '\0'
took it over MSVC's limit.  So adjust the cutoff to effectively
include the terminating '\0'.

Task-number: QTBUG-72623
Change-Id: I76ea40060d9fc13c0f7002c5ba22e71b8d0af787
Reviewed-by: Peter Hartmann <peter-qt@hartmann.tk>
2019-03-01 13:26:46 +00:00
Tobias Hunger
83354655b2 CMake: pro2cmake.py: Simplify code and add test for line continuation
Simplify code a bit and add a test for line continuation fixup.

Change-Id: If865bc94d7d419c65d3280b5f9613ebc0d3db74a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-02-28 08:08:41 +00:00
Tobias Hunger
f2e968b245 CMake: pro2cmake.py: Handle for loops without block
Handle for loops with a single line of instructions and add a test
for that.

Change-Id: I041ae30f64abcbd3db7df29933647f047b92ede3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-02-28 08:08:30 +00:00
Tobias Hunger
33fe56c630 CMake: pro2cmake.py: Make \$\$QT_FOO work in assignments
This broke somewhere along the way. Add a test for this.

Change-Id: I106ddff6eb86a51ef132285d1bc623f3b5cf71fb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-02-28 08:08:17 +00:00
Tobias Hunger
754ba28799 CMake: pro2cmake.py: Fix parsing of Line continuation before end of file
... and add a test case for this.

Change-Id: If20d737b54ecb3f9e128e59070b238c840acad6c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-02-28 08:08:08 +00:00
Tobias Hunger
8512f5179d CMake: pro2cmake.py: Fix parsing of for loops
Ignore for loops in the pro2cmake.py parser and add a unit test for that.

Change-Id: I2a0c075c45cf56f4f24ada2d53e8e8e94ce19f26
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-02-28 08:08:00 +00:00
Tobias Hunger
04d6981702 CMake: run_pro2cmake.py: Add statistics
Change-Id: I78e65970694d0c37c4b3c3ba6e6a83155579ea0f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-02-28 08:07:07 +00:00
Tobias Hunger
eb832cb00a CMake: pro2cmake.py: Handle complex conditions
Change-Id: Ifb047e5736f1831ddbd65b210e760c2729378334
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-02-28 08:06:49 +00:00
Tobias Hunger
951e297362 CMake: pro2cmake.py: Warn and fix broken line continuation
Warn on broken line continuation in .pro-files, but fix up the issue
and proceed.

Change-Id: Ibe68011b312bcea25620ce790a0b44b2983fbd88
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-02-28 08:06:41 +00:00
Tobias Hunger
c971d2d359 CMake: pro2cmake.py: Handle values with () in assignments
Change-Id: I0f59c7fa57cd6c64b151f439d4eea4ae56dca288
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-02-27 16:03:20 +00:00
Tobias Hunger
22dc78f417 CMake: pro2cmake.py: Fix handling of TEMPLATE=subdir .pro-files
Change-Id: I52f575df199c4d9b38123ab5d838f2e85344835d
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-02-27 16:03:07 +00:00
Tobias Hunger
8c04d6c967 CMake: pro2cmake.py: Improve condition simplification code
Improve the code that simplifies conditions to take "OS families"
into account. E.g. if a system must be ANDROID, then it is redundant
to express that it is NOT APPLE_OSX.

Change-Id: Ib7e62726c309bf84b9e5e0d6a6e3465511db0ead
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-02-27 16:02:58 +00:00
Tobias Hunger
35f23a3dad CMake: pro2cmake.py: Better parsing of scopes with else
Parse conditions more exactly as before, enabling proper handling
of else scopes.

Change-Id: Icb5dcc73010be4833b2d1cbc1396191992df1ee4
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-02-27 16:02:45 +00:00
Tobias Hunger
b1fa25e7b8 CMake: Small unsorted fixes in preparation of upgrading to dev branch
Change-Id: Id4d03558e956c6994dc6a8b701030ba4edf86adf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-02-27 16:02:29 +00:00
Mikhail Svetkin
885494c50f CMake: Fix build without double-conversion on macOS
Change-Id: I5102e93141eec95044df44884dcf6ecd1b9e8dd0
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-02-27 15:28:11 +00:00
Albert Astals Cid
31e1dda94b cmake: Give the egl_x11 test the necessary libs to compile
And add the eglfs_x11 plugin

We need to actually try to compile the test as the comment it it says
that having x11 and egl is not enough since sometimes they are actually
incompatible

Change-Id: If6bdc08c21b91fa9c41663f2fa653fd59e5ddd2e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-27 15:04:59 +00:00
Albert Astals Cid
e03596c2a7 pro2cmake: account for child .pro files having includes
Change-Id: Ic2213578c9bd27787ae9788acbe4455252a1158c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-27 15:04:48 +00:00
Robert Loehning
85b0ce8ca3 Fix can not -> cannot
Change-Id: Ie9992f67ca59aff662a4be046ace08640e7c2714
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-02-25 13:03:45 +00:00
Qt Forward Merge Bot
67c70b22f6 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ifa143cc462301aaa305c9c85360e543553a751f0
2019-02-19 01:00:08 +01:00
Albert Astals Cid
5f8e4b7cf0 cmake: add more mappings to helper.py
Change-Id: Ie5096c1fe74105db84ccd60655a20d389a887b14
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-18 08:06:49 +00:00
Albert Astals Cid
dc0870db74 pro2cmake: Target dependencies can be on -private libs
so use map_qt_library instead of map_qt_base_library

Change-Id: I4dd0097fff3ffd9ec4aad36d11d79ea23a08cb90
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-18 08:05:49 +00:00
Joerg Bornemann
8fe3680193 Add cmdline feature to qmake
[ChangeLog][qmake] A new feature "cmdline" was added that implies
"CONFIG += console" and "CONFIG -= app_bundle".

Task-number: QTBUG-27079
Change-Id: I6e52b07c9341c904bb1424fc717057432f9360e1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-02-18 07:12:14 +00:00
Albert Astals Cid
db9cb61993 cmake: helper.py more mappings
Change-Id: I69a1715bbda8f5ddfb367e7c7c693e4ec412f5c3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-15 15:08:12 +00:00
Albert Astals Cid
d523a642dc cmake: enable vnc platform plugin
Change-Id: I5015681aff3c9ceb5c0b72571bc8756f3ada104c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-12 17:02:02 +00:00
Simon Hausmann
519ef817ff Fix Desktop GL/EGL/GLESv2 linkage
This change fixes a few things in one go:

  * cmake's FindOpenGL cannot be used reliably to detect EGL. So use a
    custom module for that.
  * Added a custom module for GLESv2 detection, as cmake's FindOpenGL
    does not support that.
  * Map CONFIG += opengl to a WrapOpenGL target, which links against
    either GLESv2 or libGL - just like mkspecs/features/*/opengl.prf
  * cmake's FindOpenGL remains in use solely to detect the availability
    of desktop gl.

Change-Id: I9315e5ad1fd88e1b7dc7e920053e98fb51fea7fc
Reviewed-by: Volker Krause <volker.krause@kdab.com>
2019-02-12 14:57:30 +00:00
Albert Astals Cid
0a14d13b30 cmake: Find and build odbc plugin
Change-Id: I479d2b1cc897f601ef68b10272c9396e52228201
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-02-12 14:39:50 +00:00
Albert Astals Cid
11acba6504 cmake: Find and build psql plugin
Change-Id: I8cbc8ab0061f67824d78198cbb926f0625fc7e41
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-02-12 14:39:33 +00:00
Albert Astals Cid
9bef044a0b cmake: Search and enable the sqlite[3] plugin
Added to QtFeature.cmake a way to be able to run feature_module begin
and end without having an actual module by passing NO_MODULE

Change-Id: Ib708bd3878e2591da193d18563c8932cc4b75e7f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-12 14:02:22 +00:00
Albert Astals Cid
05aeaed906 Find mtdev and use it
Change-Id: I90db48efaa6a23add770fcf69b46c4f4c84866c1
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-02-12 13:35:07 +00:00
Albert Astals Cid
92f81ebc21 configurejson2cmake.py: openssl -> OpenSSL mapping
Change-Id: I29480dfbd4f144e3d5620b43419ec46fb866cf4b
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-02-12 11:22:53 +00:00
Kai Koehne
7b434c0287 CMake: Fix build of system jpeg is not available
Change-Id: Ie7462db556d0615e74755fa4fc3b51f625aade2f
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-02-12 09:47:23 +00:00
Albert Astals Cid
443ee65d3b configurejson2cmake.py: Don't emit a fixme for C++11 config
Change-Id: I8408f6126115a0f76b0fed2cc42b54e5c148821d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-12 09:25:01 +00:00
Albert Astals Cid
cfba14e1e9 configurejson2cmake.py: Support for the two cases that have LIBS +=
Since there's only two i hardcoded it for the moment instead of trying
to parse the line

Change-Id: I0da578af64ef9621cbbc78bf6ce15bf8a3f63f1c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-12 09:24:31 +00:00
Albert Astals Cid
2e64ac90d8 cmake: also write FIXME on the configure.cmake for 'use'
Since most of the times it means we need to link with some other stuff

Change-Id: I06262d4403225bca7a5e68d47145fefcf6702e5a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-12 09:22:02 +00:00
Albert Astals Cid
f6a830095f cmake: blacklist xlib test, we can just use X11_FOUND
Change-Id: Ic733c42e11b00fa8bf107f460a0596aeb10ac37b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-12 09:21:46 +00:00
Albert Astals Cid
3882e9ea09 cmake: Find Cups and enable its plugin
Change-Id: I44bf176587331d86eb147d106f28deb0a6618ab4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-12 09:20:20 +00:00
Albert Astals Cid
71c9db7da8 cmake: Blacklist the libinput_axis_api test
We already have a cmake find module for libinput so we know it is there

Change-Id: I153544c5c13cb57b1ce258243ede17f4be9507fd
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-02-12 08:49:55 +00:00
Albert Astals Cid
ac96d08b9d cmake: find gtk3 and build the gtk3 platformtheme
Change-Id: I7db7321a2fd5ea0eda1924f3dece3b1c86d87d10
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-11 17:16:28 +00:00
Tobias Hunger
3726b58d3b CMake: pro2cmake.py: Simplify condition generation
There is no need to try and avoid extra () and NOTs: Those will be
removed by sympy later anyway.

Change-Id: I39d3e4d1d829579e532bfbbf6c69e0f1e06e9a22
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2019-02-11 17:16:20 +00:00
Albert Astals Cid
f18db41f85 cmake: Find tslib and build the tslib plugin if found
Change-Id: I7119ddf473a3ede29bbfef23cffb08a4fcbd5681
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-11 17:16:17 +00:00
Tobias Hunger
93564b3f8b CMake: pro2cmake.py: Treat ANDROID_EMBEDDED as ANDROID
Treat ANDROID_EMBEDDED as ANDROID when simplifying conditions.

Change-Id: I2cf0ea1e1a3e882e3a7b7276867dcee452866ade
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2019-02-11 17:16:08 +00:00
Tobias Hunger
fb33efd274 CMake: pro2cmake.py: Do not go into infinite loop
Do not go into an infinite loop when replacing a variable with itself.

Change-Id: I2765b1c0c567753f26ca75e0533c1d193362b456
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2019-02-11 17:15:58 +00:00
Tobias Hunger
fffc12cc34 CMake: helper.py: Map harfbuzz library
Change-Id: I71daa9acf391c70c6cba99609c1f67ca5eeaa220
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2019-02-11 17:15:47 +00:00
Tobias Hunger
b388bc7e77 CMake: pro2cmake.py: Handle equals(foo, bar) in conditions
This adds an overly simplistic mapping -- just like it does for the
rest of the qmake test functions.

Change-Id: I0c9e3b70c1c3d0c68a245706a141aa7b7cb4d8bf
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-02-11 10:46:29 +00:00
Tobias Hunger
35a30c7ebb CMake: pro2cmake.py: Expand qmake values in file names, etc.
Expand qmake values when dealing with source file names, include
directories and more. This handles cases where variables are used
to refer to sources (e.g. $$VERSIONTAGGING_SOURCES in corelib) as
well as things like $$QT_SOURCE_TREE and friends.

Note that $$PWD and $$OUT_PWD are still need hand-holding since they
refer to the scopes directory relative to the top level directory --
which pro2cmake.py does not know.

Change-Id: I011ef55416ff820053d5f844b3008836849f5075
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 09:39:36 +00:00
Tobias Hunger
199cce0c20 CMake: pro2cmake.py: Better mapping of complex conditions
.pro-files support things like contains(Foo, bar), etc.

Map that in such a way that only one identifier will be visible to
CMake to unconfuse the logic handling on that side. These conditions
will need manual fixup later!

Change-Id: Id4946e694a9adccf9f54bcce26a6c227cd921007
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 09:38:33 +00:00
Tobias Hunger
d796410045 CMake: pro2cmake.py: Remove some dead code
Change-Id: I8e3e7e4c4ef9747e0749734bdf875baccc4646bd
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-02-11 09:37:46 +00:00
Tobias Hunger
6104643db0 CMake: pro2cmake.py: Remove leading ./ in paths
Remove leading './' from paths before writing them into CMakeLists.txt.

Change-Id: I5680a3470cf491a8805b559197f94f8e6a6ce9b7
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 09:36:00 +00:00
Tobias Hunger
64e3c8bb19 CMake: pro2cmake: Fix handling of chained scopes with else branches
Fix handling of things like:

foo:bar:buz: {
    do something
} else: wat {
    do something else
}

The else relates to foo AND bar AND buz, not just to buz in this case.

Change-Id: I40d1fa295b4d6dd95ae5e1ce2d58372edc807b86
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 09:35:29 +00:00
Tobias Hunger
73f5036be5 CMake: Map dlopen feature to 'ON'
Map the dlopen feature to 'ON'. The effect is that cmake will figure
out whether or not linking to 'dl' is necessary or not.

The user-visible feature is 'library' anyway: That enables dynamic
library loading -- and will link in 'dl' as needed.

Change-Id: I0d68275a7234efba7f926150f120bb37b4a1163f
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 09:35:07 +00:00
Tobias Hunger
25457f29db CMake: pro2cmake.py: Add XCB and X11 libraries
Add all the XCB and X11 libraries needed for the XCB plugin.

Change-Id: I772b99c68521cd46cbba736912c8d8594d9d2ad8
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 09:34:44 +00:00
Tobias Hunger
e616976fdf CMake: pro2cmake.py: Small fix to type markup
Change-Id: I2f7dc94f379d51c3816649849aa7365b17334ab5
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-01-31 15:24:09 +00:00
Tobias Hunger
6dd989fe61 CMake: pro2cmake.py: Add scope debugging support
Dump scope trees for all scopes that contain a variable
'PRO2CMAKE_SCOPE_DEBUG' (set to any value).

Change-Id: If17bb1697a32ccaa427a858c2330ab2b019d0fa8
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-01-31 15:23:59 +00:00
Tobias Hunger
cfbb110abe CMake: pro2cmake.py: Assign a unique id to each scope
This makes scopes much simpler to destinguish from each other.

Change-Id: I1af42f181b5899aba749bcf9267a345385149f90
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-01-31 15:23:22 +00:00
Tobias Hunger
0efd241d20 CMake: pro2cmake.py: report total condition when dumping a scope
Show the total_condition (if set) when dumping a scope.

Change-Id: I9dfe98c2251f1d28881771042f17d723cedc8907
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-01-31 15:23:09 +00:00
Tobias Hunger
ca4edbec66 CMake: pro2cmake.py: Add a way to debug merges of scopes
Generate debug output whenever a qmake scope with a variable
'PRO2CMAKE_MERGE_DEBUG' is involved in a scope merge.

Change-Id: I0ad94b881db9930de689c199adbac084efe6c03b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-01-31 15:22:59 +00:00
Tobias Hunger
645002cd43 CMake: pro2cmake.py: Handle more libraries
Change-Id: I561b619c4dbc56a1f6ad383a68ce4b82858a031c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-01-31 13:58:07 +00:00
Tobias Hunger
e7e793555f CMake: Add FindZSTD.cmake and wire it up in configurejson2cmake.py
Zstd is used in the dev branch, so prepare for it.

Change-Id: I130d98e3888a1eb4c7444728fc5088c5dae9d911
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-01-31 13:57:24 +00:00
Tobias Hunger
1218d8a9f0 CMake: Use FindGLIB2 from cmake-extra-modules
Use FindGLIB2 from cmake-extra-modules over hand-rolled own version.

Change-Id: I1f8e055bc12dd728c033fd88480690643d90159a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-01-31 13:56:55 +00:00
Tobias Hunger
210762ae46 CMake: pro2cmake.py: Pass QMAKE_MOC_OPTIONS on to CMake
Change-Id: I39c1b0aedbffaa29a34253e0c1c4bb4a4dddbe98
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-01-31 10:02:40 +00:00