From 406d5c6315b5c2500473883baea7d8db70d9eb78 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Fri, 9 May 2025 09:09:11 +0300 Subject: [PATCH] CMake: Allow skipping the fake install prefix for examples Add CMake variable to allow use of DESTDIR when installing examples in a standalone example build and skipping the fake prefix that would be otherwise used. Similar variable is already used for tests. Pick-to: 6.9 6.8 Change-Id: I427cbb5c198f8e89b1685792b7c1d90413213254 Reviewed-by: Alexandru Croitor Reviewed-by: Joerg Bornemann --- cmake/QtBuildRepoExamplesHelpers.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/QtBuildRepoExamplesHelpers.cmake b/cmake/QtBuildRepoExamplesHelpers.cmake index de9b224b8a2..9daf2e09a26 100644 --- a/cmake/QtBuildRepoExamplesHelpers.cmake +++ b/cmake/QtBuildRepoExamplesHelpers.cmake @@ -224,7 +224,7 @@ function(qt_internal_get_example_install_prefix out_var) # Allow customizing the installation path of the examples. Will be used in CI. if(QT_INTERNAL_EXAMPLES_INSTALL_PREFIX) set(qt_example_install_prefix "${QT_INTERNAL_EXAMPLES_INSTALL_PREFIX}") - elseif(QT_BUILD_STANDALONE_EXAMPLES) + elseif(QT_BUILD_STANDALONE_EXAMPLES AND NOT QT_NO_FAKE_STANDALONE_EXAMPLE_INSTALL_PREFIX) # TODO: We might need to reset and pipe through an empty CMAKE_STAGING_PREFIX if we ever # try to run standalone examples in the CI when cross-compiling, similar how it's done in # qt_internal_set_up_fake_standalone_parts_install_prefix.