Commit Graph

11 Commits

Author SHA1 Message Date
Ievgenii Meshcheriakov
a7b70ee55b CMake: Add CryptoTokenKit framework for macOS
Set ${FWCryptoTokenKit} when the framework has been found.
This is useful for WIP card reader support in QtConnectivity.

Task-number: QTBUG-97946
Change-Id: I0e85e0fd2e0fc45fb3069bbdaa2d8b2c927a6c2d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-12-23 18:11:36 +01:00
Juha Vuolle
605d383a70 CMake: Add CoreBluetooth framework for macOS
The Qt bluetooth module uses ${FWCoreBluetooth} when building for iOS,
but that evaluated to empty.

Pick-to: 6.2
Change-Id: I93ff2c30697a912bed454087ae260fae9cc41b0f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-10 16:59:17 +02:00
Alexandru Croitor
7b3d9efc04 CMake: Place internal apps in the correct output directory
In a -debug-and-release build, apps were placed under bin/Release
rather than just bin.

Apply the logic we use for tools for apps as well. Rename and move
the common functions into QtTargetHelpers.cmake.

Pick-to: 6.2
Fixes: QTBUG-95028
Change-Id: I5a9082ea50c9238c8fcf0c6dd099708fbc571bf8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-07-09 09:44:58 +02:00
Alexey Edelev
169a248fdf Make framework names consistent with the module names
For Apple's frameworks it's possible to include header files using the
following assumption:
If the framework name is "MyFramework" then
'#include <MyFramework/frameworkheader.h>' will work without specifying
the include path explicitly. This is broken for internal modules since
they use the framework name with the 'Private' suffix.

This uses the module name instead of the target name as a framework
name.

Amends edbe0eb335

Task-number: QTBUG-87775
Change-Id: I0592a28d0768724b6e10ca81aa7cefb0a3699a5e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-06-03 12:55:02 +02:00
Alexey Edelev
4333bfd9d8 Move the framework related information to the common function
Since the information about framework is performed in multiple places
it's quite hard to control its consistency. This moves the obtaining
of framework related information to the common function and adjusts
the use of the information across the repo.

Change-Id: I1f488d41dcea75a1e8c361926792a6b7c45e5a3f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-05-31 20:50:07 +02:00
Alexey Edelev
425ff34aa1 Merge main and private targets of the internal modules
In cmake, targets are used as an entity for modules. This causes a
number of problems when we want to manipulate a module as a separate
entity with properties associated with it.
The _qt_internal_module_interface_name target property is introduced to
represent the module entity. All modules write a name to this property,
which will subsequently expand into the module name matched with
the module name in qmake.

The 'qt_internal_module_info' function is responsible for providing the
correct values ​​for the module properties used when working with a module
target.

Unlike qmake, for internal modules in cmake it is expected that the
Private suffix will be specified explicitly. In case the user wants to
have a different module name, an additional argument
MODULE_INTERFACE_NAME of the qt_internal_add_module function is
introduced.

This also changes the way how target dependencies are collected and
resolved. Since the 'Private' suffix no longer means an unique
identifier of the module 'Private' part, we look for the both Private
and non-Private package names when resolving dependencies.

TODO: This change doesn't affect the existing internal modules, so to
keep compatibility with the existing code the existing internal modules
create 'Private' aliases. The code that provides backward compatibility
must be removed once all internal modules will get the proper names.

Taks-number: QTBUG-87775
Change-Id: Ib4f28341506fb2e73eee960a709e24c42bbcd5ec
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-05-20 19:40:45 +02:00
Juha Vuolle
ec3e90a9e4 Add CoreMotion to the list of looked-up frameworks (Mac/iOS)
The CoreMotion is required by the QtSensor module.

Task-number: QTBUG-92502
Change-Id: I7f1853131aa96b2cb052862d5bf492df5ec18150
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-04-14 11:16:52 +03:00
Ivan Solovev
e86e9d0725 CMake: add CoreLocation framework for macOS
Task-number: QTBUG-89854
Change-Id: Icd52a6dd0ae36ae91599ab9a583e6920f2d2ba4c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-15 15:16:28 +01:00
Tor Arne Vestbø
5c1ed8bb74 Use 'A' for Apple framework version instead of Qt major version
All system frameworks use 'A' instead of the major version of the
framework, and Xcode's code signing assumes that the framework version
is 'A' when signing embedded frameworks (FB7323980), so leave the
version 'A'. This is also what Apple recommends.

Change-Id: Idbf2e30e156c3e869da8f75731e568524d9407e5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-23 16:59:06 +02:00
Alexandru Croitor
948f2a9cac CMake: Don't hardcode Xcode SDK frameworks into public dependencies
Using find_library() to find an Xcode framework will end up embedding
the absolute path of the framework into INTERFACE_LINK_LIBRARIES.
A different machine might not have the SDK installed in the same
location, which will cause build failures. This happens in our CI
because Xcode is installed to /Applications/Xcode11.app.

To fix this, replace all system framework paths with
'-framework Foo' flags instead.
We already do this for OpenGL and OpenGL ES.

In the future we might want to convert these into full standalone
FindFoo scripts that expose proper targets.

Fixes: QTBUG-86299
Task-number: QTBUG-86422
Task-number: QTBUG-85240
Change-Id: I22b2b2d1d9e92108098d3974105e3758978cd8e2
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-09-09 18:52:46 +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