From 1031fa15472bba3f20691cda2305e0821391c5db Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 16 Dec 2021 12:55:07 +0100 Subject: CMake: Allow installing examples outside of the Qt prefix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduce a new QT_INTERNAL_CUSTOM_INSTALL_DIR variable to allow specifying an 'examples install dir' outside of the Qt prefix. It will be used in a follow-up change to ensure we don't package the example binaries in our CI artifacts (thus saving space). This will be even more important when the examples will contain code to deploy Qt libraries alongside each deployed example (which would significantly increase the package size). Pick-to: 6.2 6.3 Task-number: QTBUG-90820 Task-number: QTBUG-96232 Change-Id: I06b4a8f9e8c57a712a356bca0f5c351a9362bc30 Reviewed-by: Jörg Bornemann Reviewed-by: Qt CI Bot --- cmake/QtPostProcessHelpers.cmake | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmake/QtPostProcessHelpers.cmake') diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake index 60a745c0f5..12e44113b2 100644 --- a/cmake/QtPostProcessHelpers.cmake +++ b/cmake/QtPostProcessHelpers.cmake @@ -596,6 +596,12 @@ endif()\n") "set(QT_BUILD_TOOLS_WHEN_CROSSCOMPILING \"TRUE\" CACHE BOOL \"\" FORCE)\n") endif() + if(QT_INTERNAL_CUSTOM_INSTALL_DIR) + file(TO_CMAKE_PATH "${QT_INTERNAL_CUSTOM_INSTALL_DIR}" qt_internal_custom_install_dir) + string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS + "set(QT_INTERNAL_CUSTOM_INSTALL_DIR \"${qt_internal_custom_install_dir}\" CACHE STRING \"\")\n") + endif() + # Save the default qpa platform. # Used by qtwayland/src/plugins/platforms/qwayland-generic/CMakeLists.txt. Otherwise # the DEFAULT_IF condition is evaluated incorrectly. -- cgit v1.2.3