Adapt the logic to install and detect especially the
plugins libs:
* Do not just compile them into the app build folder, but
keep the libs separate under the 'plugins' direcory
* At installation time, follow the logic of *deployqt
for Qt plugins, and store them in CMAKE_INSTALL_PREFIX/plugins
(Linux, Windows) or Document Viewer.app/Contents/Plugins
(macOS).
Unfortunately, this all requires different look ups at runtime for
all operating systems. For macOS and Windows, we furthermore need
to check both for valid paths with an installed build, and an
un-installed build.
While at it, move the install logic to app/CMakeLists.txt, so that
there is less repetition.
An alternative approach would be to calculate the relative paths
at configure time, and either pass on command line or in a created
header file. Anyhow, the current approach is more compact.
Pick-to: 6.10
Fixes: QTBUG-138476
Change-Id: I467d3bd4e14ef6b8b747bceb7177837e2edd3b8c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The included CMakeLists.txt files are _not_ standalone projects,
so remove any project() as well as duplicated find_package() calls.
Pick-to: 6.10
Change-Id: Ia56128e19588d38eb3c91fac7e9a188f82146515
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This is a cleaner approach then manually tweaking the dependent targets
include directories.
Pick-to: 6.10
Change-Id: I8382f5556c950398e8a553a77f380922ed14ae9b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Do not use the QT_ prefix, as that is reserved for Qt itself,
not client code (which an example is).
* Do not define the define on a global level, but as a PUBLIC
target definition for the abstractviewer library.
Pick-to: 6.10
Change-Id: I01a001b0c0706e9f951118472fe1a62ff68a2e4e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This fixes a cmake warning that the output path does not match
The Q3DViewerModule target is a QML module with target path Q3DViewer. It
uses an OUTPUT_DIRECTORY of
$HOME/dev/qt/dev/src/qtdoc/examples/demos/documentviewer/build/Qt_6_10_0_build-Debug/plugins/q3dviewer,
which should end in the same target path, but doesn't. Tooling such as
qmllint may not work correctly.
Pick-to: 6.9
Change-Id: I33e402a52e3ee5747da428b9a74121e35345f63d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>