CMake: Rename QT_INTERNAL_CUSTOM_INSTALL_DIR

to QT_INTERNAL_EXAMPLES_INSTALL_PREFIX so it's clear that the
variable only affects the location of where examples
are installed.

And make sure the paths are passed as CMake paths.

Amends 1031fa1547

Pick-to: 6.2 6.3
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: Ib92c55488b736d980da2bd88255de78e183de824
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Alexandru Croitor 2022-03-21 11:13:20 +01:00
parent c926ef55de
commit 33f631920f
2 changed files with 8 additions and 6 deletions

View File

@ -1129,12 +1129,13 @@ function(qt_internal_add_example_external_project subdir)
# example_source_dir, use _qt_internal_override_example_install_dir_to_dot to ensure # example_source_dir, use _qt_internal_override_example_install_dir_to_dot to ensure
# INSTALL_EXAMPLEDIR does not interfere. # INSTALL_EXAMPLEDIR does not interfere.
# Allow installing somewhere under the build dir. # Allow customizing the installation path of the examples. Will be used in CI.
if(QT_INTERNAL_CUSTOM_INSTALL_DIR) if(QT_INTERNAL_EXAMPLES_INSTALL_PREFIX)
set(qt_example_install_prefix "${QT_INTERNAL_CUSTOM_INSTALL_DIR}") set(qt_example_install_prefix "${QT_INTERNAL_EXAMPLES_INSTALL_PREFIX}")
else() else()
set(qt_example_install_prefix "${CMAKE_INSTALL_PREFIX}/${INSTALL_EXAMPLESDIR}") set(qt_example_install_prefix "${CMAKE_INSTALL_PREFIX}/${INSTALL_EXAMPLESDIR}")
endif() endif()
file(TO_CMAKE_PATH "${qt_example_install_prefix}" qt_example_install_prefix)
set(example_install_prefix "${qt_example_install_prefix}/${example_rel_path}") set(example_install_prefix "${qt_example_install_prefix}/${example_rel_path}")

View File

@ -597,10 +597,11 @@ endif()\n")
"set(QT_BUILD_TOOLS_WHEN_CROSSCOMPILING \"TRUE\" CACHE BOOL \"\" FORCE)\n") "set(QT_BUILD_TOOLS_WHEN_CROSSCOMPILING \"TRUE\" CACHE BOOL \"\" FORCE)\n")
endif() endif()
if(QT_INTERNAL_CUSTOM_INSTALL_DIR) if(QT_INTERNAL_EXAMPLES_INSTALL_PREFIX)
file(TO_CMAKE_PATH "${QT_INTERNAL_CUSTOM_INSTALL_DIR}" qt_internal_custom_install_dir) file(TO_CMAKE_PATH
"${QT_INTERNAL_EXAMPLES_INSTALL_PREFIX}" examples_install_prefix)
string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS
"set(QT_INTERNAL_CUSTOM_INSTALL_DIR \"${qt_internal_custom_install_dir}\" CACHE STRING \"\")\n") "set(QT_INTERNAL_EXAMPLES_INSTALL_PREFIX \"${examples_install_prefix}\" CACHE STRING \"\")\n")
endif() endif()
# Save the default qpa platform. # Save the default qpa platform.