qt5base-lts/examples/widgets
Alexandru Croitor 638ac41293 CMake: Fix painting examples to build as standalone projects
The examples use an intermediate object library to avoid duplicate
file compilation. The examples worked when built as part of Qt
because the shared directory was always added, and Qt::OpenGL is
available implicitly.

Change each project to add_subdirectory(../shared) if the object
library is not available, thus making the examples build as standalone
projects.

Call find_package inside the shared project, to ensure the Qt packages
are found.

Create an alias called 'painting_shared::painting_shared' and link
against that to ensure that any failure is caught at configure time
rather than build time.

Adapt the pathstroke example to use the object library.

Comment out the code for the OpenGL scopes, because it's handled
by the object library.

Make sure the OpenGL dependency is public.
Make sure to run moc and compile the OpenGL specific files as well.

Task-number: QTBUG-87444
Change-Id: Ib0ecb68948581c5267ca04f19d8043fa44ff3d54
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-27 19:26:45 +01:00
..
animation CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
desktop CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
dialogs CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
doc Use QScroller in the Dir View example 2020-10-14 18:29:00 +00:00
draganddrop CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
effects CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
gallery CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
gestures CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
graphicsview CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
itemviews CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
layouts CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
mainwindows CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
painting CMake: Fix painting examples to build as standalone projects 2020-10-27 19:26:45 +01:00
qnx/foreignwindows Use QList instead of QVector in statemachine 2020-07-06 14:06:13 +02:00
richtext CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
scroller CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
tools CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
touch CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
tutorials CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
widgets CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
windowcontainer CMake: Regenerate examples to set the WIN32_EXECUTABLE property 2020-10-27 12:49:39 +01:00
.prev_CMakeLists.txt CMake: Regenerate projects 2020-09-22 19:08:53 +02:00
CMakeLists.txt Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
widgets.pro Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00