summaryrefslogtreecommitdiffstats
path: root/cmake/QtFrameworkHelpers.cmake
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Place internal apps in the correct output directoryAlexandru Croitor2021-07-091-1/+1
| | | | | | | | | | | | | | 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>
* Make framework names consistent with the module namesAlexey Edelev2021-06-031-11/+17
| | | | | | | | | | | | | | | | | | 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 edbe0eb335ca4c0fde23f57eae5acdf80937c9e3 Task-number: QTBUG-87775 Change-Id: I0592a28d0768724b6e10ca81aa7cefb0a3699a5e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Move the framework related information to the common functionAlexey Edelev2021-05-311-11/+41
| | | | | | | | | | 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>
* Merge main and private targets of the internal modulesAlexey Edelev2021-05-201-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add CoreMotion to the list of looked-up frameworks (Mac/iOS)Juha Vuolle2021-04-141-1/+1
| | | | | | | | The CoreMotion is required by the QtSensor module. Task-number: QTBUG-92502 Change-Id: I7f1853131aa96b2cb052862d5bf492df5ec18150 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: add CoreLocation framework for macOSIvan Solovev2021-01-151-0/+1
| | | | | | Task-number: QTBUG-89854 Change-Id: Icd52a6dd0ae36ae91599ab9a583e6920f2d2ba4c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Use 'A' for Apple framework version instead of Qt major versionTor Arne Vestbø2020-09-231-1/+1
| | | | | | | | | | 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>
* CMake: Don't hardcode Xcode SDK frameworks into public dependenciesAlexandru Croitor2020-09-091-25/+44
| | | | | | | | | | | | | | | | | | | | | 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>
* CMake: Split QtBuild.cmake into smaller filesAlexandru Croitor2020-08-141-0/+106
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>