Alexandru Croitor 6574bc915c CMake: Split QtBuild.cmake into smaller files v2
My motivation to do this:
- it got big and tangled again
- sometimes functions need to be added to QtBuild.cmake rather than
  to a separate file because they need to be called before some of the
  global variables are set, to determine the value of those global
  variables (in my case install paths needed to be modified when
  building with xcframework support)
- some of the global variable assignments have dependencies on other
  variables already being set and it's hard to keep track where that
  happens

Split the contents of the file into smaller functions and macros
and place them into pre-existing files when appropriate, or
into new files. The new files are:
- QtBuildHelpers.cmake
- QtBuildPathsHelpers.cmake
- QtMkspecHelpers.cmake

The idea is to have Helpers file only define functions and never call
them, so it's easy to include the file where needed without being
scared of side effects.
QtBuild.cmake will just include the helpers and call one entry point
function to set up everything that was done by the file before.
QtBuild.cmake is not merged into QtSetup, to make it easier to git
blame (it's hard to blame a removed file).

No new features were added as part of the refactoring.

Some function names were renamed (but not all of them) to include
the qt_internal prefix.
Some lines were reformatted so they don't pass 100 chars limit after
the code was placed into a function / macro.
The Helpers includes were re-sorted.
Some function calls were re-ordered where the order call didn't
matter.
Some of the code in QtAndroidHelpers.cmake was wrapped into a macro
so that including the file does not cause side-effects by default.

I'd like to follow up with similar changes for QtSetup.cmake and
QtBuildInternalsConfig.cmake where possible, because having a few
"entry points" into building a Qt submodule is also confusing,
especially for those that aren't familiar with the build system and
why certain things go into certain places.

The intent is to cherry-pick this also to 6.5 and 6.6.

Amends 44cce1a2ea9dadd8b2de93f40de34269dda703c0

Task-number: QTBUG-86035
Change-Id: I02ceff8ceb9b6e9c78bc85d6a42deb02fca3e46b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Orkun Tokdemir <orkun.tokdemir@qt.io>
(cherry picked from commit 10735d68b939b90c431c2d38e40be9c8fb4607b3)
2023-11-28 17:19:34 +01:00
2020-11-16 10:02:08 +02:00
2023-11-17 22:36:47 +00:00
2015-08-18 19:59:14 +00:00
2023-11-16 15:02:15 +02:00
2023-11-16 15:02:15 +02:00
2023-11-09 02:42:49 +00:00
2012-09-07 15:39:31 +02:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%