Commit Graph

19 Commits

Author SHA1 Message Date
Tor Arne Vestbø
8186f18c4a cmake: Allow module to specify initial depends
Change-Id: I85f39f16f2103dcb42ff467bbc79a0baf6c020e1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-09 16:01:51 +01:00
Alexandru Croitor
d38b29bfa6 CMake: Private module pri files should have internal_module
Change-Id: I35b4111e4044ae6283eb8175173453db9001c71b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-07 19:33:37 +01:00
Tor Arne Vestbø
6032a9ca1a Allow adding linker flags to qmake module pris
The flags go before the library in the final linker line, as opposed
to the dependencies declared in LIBS.

This allows us to declare the flags for the entrypoint
in the project file of the entrypoint, instead of in
a standalone prf.

Change-Id: I35c054fe9fdaa6add7cd0e8ba3f7304f975ff80f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-03 00:14:04 +01:00
Tor Arne Vestbø
517c885239 Allow adding extra content to module pri
On the qmake-side we had exports, but they were quoted.

Change-Id: I95af4b927079691cab6403fec850f345ba181a00
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-02 16:44:10 +01:00
Alexandru Croitor
02f429f06c CMake: Clean up order of assignments in generated module pri files
Makes the diff between Qt 5.15 and 6.0 easier to read, to see what's
missing.

Change-Id: Idf8aa17b3ab8494f6855c172665423a53ca8a024
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-30 17:49:08 +01:00
Tor Arne Vestbø
5c2656cfb6 cmake: Allow specifying module 'uses' entries
Change-Id: Iee02654e0f52e36e026b8074e0eacb0ea1804685
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-28 16:52:32 +01:00
Tor Arne Vestbø
e24be7b6c3 cmake: Avoid -NOTFOUND suffix in module pri config
Change-Id: I1407a661c482d918dd143f291ee648bc7b18feef
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-28 00:22:30 +01:00
Alexandru Croitor
f65abc6344 CMake: Export QT_QPA_DEFAULT_PLATFORM in QtBuildInternalsExtra
The value is useful for QPA plugins built in repos other than qtbase,
to decide if it should be a default plugin or not.
Currently useful for qtwayland.

Also export a qmake value assignment when doing static builds, just
like src/gui/configure.pri does.

Change-Id: I1253f1a7e178b24b16e2615ba20d1e92b0b87b1a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-10-27 19:26:35 +01:00
Tor Arne Vestbø
851e1cb4c4 cmake: Allow target to specify initial module internal config
Change-Id: I7312fa19aad84b020015b304b1cd2cd5acc83b81
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-26 20:10:48 +01:00
Tor Arne Vestbø
83ad237771 cmake: Produce internal module pris like qmake does
qmake treats internal modules as just the regular module file,
but with a _private suffix, as opposed to the current cmake
logic, that treats it as the private module file, resulting
in missing e.g. the Qt.foo.module entry.

Change-Id: Id55ca4c23921656d5abfd1d0fdf6430d4fe120bf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-23 16:37:14 +02:00
Tor Arne Vestbø
1f53a91ed3 cmake: Respect NO_PRIVATE_MODULE when generating module pri files
Change-Id: Id5816d6598a0a484c20674f34f6f809e68671e6b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-23 11:36:48 +02:00
Tor Arne Vestbø
6baa0f4ccc cmake: Don't add include paths to module pri if there are no headers
Change-Id: I8fa01f45410805399a511a87c6f04192ce42d374
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-23 11:36:48 +02:00
Tor Arne Vestbø
f6012c4a56 cmake: Fix logic for adding staticlib to module pri
Change-Id: I2426e78bb509a37e7e3924506903cd84732f88d8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-16 23:59:28 +02:00
Alexandru Croitor
af9197ff91 CMake: Add missing Android values in qdevice.pri
These were introduced in
675805e9eb and
b9c85d6b0e

They should be exported if they were set.

Change-Id: Ieec565980ba148f675f84dcdd7c19894e349085f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-07 10:08:37 +02:00
Alexandru Croitor
4270522916 CMake: Export the chosen iOS SDK used when configuring Qt
The value is used by mkspecs/features/mac/default_post.prf and
ultimately by xcodebuild to decide which arch and SDK to build
against.

For a simulator_and_device build, no value needs to be set as far as
I can see.

Task-number: QTBUG-87218
Change-Id: I41992bec6b16aadfd87c3f7c10653a6094e76d3e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-07 10:08:31 +02:00
Cristian Adam
079cf55111 CMake Build: Add support for -qtlibinfix configure parameter
Rename all libQt6*.so to libQt6*<infix>.so

Task-number: QTBUG-85438
Change-Id: I4b91ffaaec7bea61454b0d3c794c77f2d0868d54
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-23 17:31:13 +02:00
Joerg Bornemann
5f729da74a CMake: Implement configure -qreal <type>
The configure argument -qreal <type> maps to the CMake argument
-DQT_COORD_TYPE=<type>.

Fixes: QTBUG-83325
Change-Id: I94970f31ccfb241b1dd4f1d9b6cef25d6684dc05
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-19 08:28:50 +02:00
Joerg Bornemann
d6e41abd62 CMake: Handle -D, -I, -F and -L configure arguments
Introduce new CMake variables and map
-D to QT_EXTRA_DEFINES,
-I to QT_EXTRA_INCLUDEPATHS,
-L to QT_EXTRA_LIBDIRS,
and -F to QT_EXTRA_FRAMEWORKPATHS.

Those variables only affect the Qt build, not user projects.

Fixes: QTBUG-85878
Change-Id: I229df2eed1505a2619068d0d32975962b052569a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-17 18:19:24 +02:00
Alexandru Croitor
44cce1a2ea CMake: Split QtBuild.cmake into smaller files
QtBuild.cmake is huge. Split it.

Move module, plugin, tools, executables and test related functions out
of QtBuild.cmake into separate files.
Do the same for many other things too.

An additional requirement is that all the new Helpers files only
define functions and macros.
No global variable definitions are allowed, nor execution of commands
with side effects.

Some notes:
qt_install_qml_files is removed because it's dead code.

Some functions still need to be figured out, because they are
interspersed and depend on various global state assignments.

Task-number: QTBUG-86035
Change-Id: I21d79ff02eef923c202eb1000422888727cb0e2c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-08-14 13:17:11 +02:00