qt5base-lts/examples/widgets/tutorials/addressbook
Craig Scott d97fd7af2b Build examples in isolated sub-builds using ExternalProject
Examples are intended to show how to build against an installed Qt.
Building them as part of the main build means the way the Qt targets
are defined and created are not representative of an end user's build.
By building them as separate projects using ExternalProject, we can
more closely replicate the intended audience's environment. This
should allow us to catch more problems earlier.

Having examples built as part of the main build also creates problems
with some static builds where a tool built by the main build is needed
during configure time. This happens with other repos like qtdeclarative
but not (currently) with qtbase. Converting the examples in qtbase to
be built using ExternalProject is intended as a demonstrator for how
other repos can do similar. Until other repos are converted, they will
continue to work as they did before, with examples as part of the main
build for non-static builds only.

The new build-externally behavior is only supported for non-prefix
builds with this change. Prefix builds will continue to use the old
non-external method. Support for building examples externally in
prefix builds will be a separate change.

Task-number: QTBUG-90820
Fixes: QTBUG-91068
Change-Id: I2304329940568dbdb7da18d54d5595ea7d8668bc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-05-26 13:33:29 +02:00
..
part1 CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
part2 CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
part3 CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
part4 CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
part5 CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
part6 CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
part7 CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
addressbook.pro
CMakeLists.txt Build examples in isolated sub-builds using ExternalProject 2021-05-26 13:33:29 +02:00
README

The Address Book Tutorial shows how to put together a simple yet
fully-functioning GUI application. The tutorial chapters can be found in the
Qt documentation, which can be viewed using Qt Assistant or a Web browser.

The tutorial is also available online at

http://qt-project.org/doc/qt-5.0/qtwidgets/tutorials-addressbook.html

All programs corresponding to the chapters in the tutorial should
automatically be built when Qt is compiled, or will be provided as
pre-built executables if you have obtained a binary package of Qt.

If you have only compiled the Qt libraries, use the following instructions
to build the tutorial.

On Linux/Unix:

Typing 'make' in this directory builds all the programs (part1/part1,
part2/part2, part3/part3 and so on). Typing 'make' in each subdirectory
builds just that tutorial program.

On Windows:

Create a single Visual Studio project for the tutorial directory in
the usual way. You can do this by typing the following at the command
line:

qmake -tp vc

You should now be able to open the project file in Visual Studio and
build all of the tutorial programs at the same time.

On Mac OS X:

Create an Xcode project with the .pro file in the tutorial directory.
You can do this by typing the following at the command line:

qmake -spec macx-xcode

Then open the generated Xcode project in Xcode and build it.