In some repos we need to be able to pass extra cache variables to find
3rd party packages when building examples as external projects.
Introduce QT_EXAMPLE_CMAKE_VARS_TO_PASS to allow passing vars like
OpenSSL_ROOT or Protobuf_ROOT if they are set in the repo project.
It should be noted that QT_EXAMPLE_CMAKE_VARS_TO_PASS expects a
special syntax for its values, of the from VAR_NAME:CMAKE_TYPE, due
to the pre-existing implementation on how we pass variables
to ExternalProject.
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: Ie3e74d4fde106f947d12e51d27e41a310157aab6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 43d0c5ed6ef666b4ef9f33c018240f551fb6ebae)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
The current deployment api implementation sets the value of
QT_DEPLOY_PREFIX based on CMAKE_INSTALL_PREFIX, if no QT_DEPLOY_PREFIX
was previously specified.
This does not work properly when multiple examples are placed in the
same subdirectory and are using deployment api.
Make sure to unset the QT_DEPLOY_PREFIX for each
qt_internal_add_example call, so that a correct prefix is computed for
each example, based on the modified CMAKE_INSTALL_PREFIX value that we
set for each example.
Task-number: QTBUG-102057
Change-Id: I931e5f2d683ab94a940e20a2bdfeaa4ac5d8c5f8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit c5d0e93199beea314e4e4607c8ef5f7c29162666)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Move most of the code into two new files:
- QtBuildRepoHelpers.cmake
- QtBuildRepoExamplesHelpers.cmake
Task-number: QTBUG-86035
Change-Id: I48c4e7c64f0ffb600118172b8e69b26018f36ffb
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>