qt5base-lts/examples/widgets/painting/shared
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
..
images
arthurstyle.cpp Remove usages of deprecated APIs of qtbase/gui 2019-07-13 10:43:15 +02:00
arthurstyle.h Cleanup QtWidgets examples 2019-10-11 06:32:30 +02:00
arthurwidgets.cpp Move QStringRef and remains to Qt5Compat 2020-08-20 00:58:13 +02:00
arthurwidgets.h Move arthurwidget based examples to new QOpenGL classes 2018-10-17 09:16:01 +00:00
CMakeLists.txt CMake: Fix painting examples to build as standalone projects 2020-10-27 19:26:45 +01:00
fbopaintdevice.cpp Cleanup QtWidgets examples 2019-10-11 06:32:30 +02:00
fbopaintdevice.h Cleanup QtWidgets examples 2019-10-11 06:32:30 +02:00
hoverpoints.cpp Replace calls to deprecated QEvent accessor functions 2020-06-08 19:11:51 +02:00
hoverpoints.h Use QList instead of QVector in examples 2020-06-23 14:01:11 +02:00
shared.pri Move QOpenGLWindow from QtGui to QtOpenGL 2020-01-15 15:38:59 +01:00
shared.qrc