diff options
author | Dominik Holland <dominik.holland@qt.io> | 2021-12-01 17:26:01 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-12-01 20:10:51 +0000 |
commit | 0885fb16dac9368bbec6fa46eee5cfa326420384 (patch) | |
tree | 5d7a7c6e4b614019fef9fff8ca038e9c714e0b37 | |
parent | 1147ee63f4ff2045ab10bd2b904cde3f3deee276 (diff) | |
download | qtapplicationmanager-0885fb16dac9368bbec6fa46eee5cfa326420384.tar.gz |
CMake: Fix qt6_am_add_systemui_wrapper to work with standalone examples
We cannot rely on qt_internal_collect_command_environment outside of
the module build and need to calculate the paths ourself instead.
Change-Id: I201c3d2037ceb40989e555c84d37fb17a42cdc39
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
(cherry picked from commit 2b57fb6082a9861ce504ff5a089a7fd04c7bad0d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/main-lib/Qt6AppManMainPrivateMacros.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main-lib/Qt6AppManMainPrivateMacros.cmake b/src/main-lib/Qt6AppManMainPrivateMacros.cmake index c9f2fa4e..8e92f89e 100644 --- a/src/main-lib/Qt6AppManMainPrivateMacros.cmake +++ b/src/main-lib/Qt6AppManMainPrivateMacros.cmake @@ -63,7 +63,12 @@ function(qt6_am_add_systemui_wrapper target) configure_file(${_AM_MACROS_LOCATION}/wrapper.cpp.in main.cpp) - qt_internal_collect_command_environment(test_env_path test_env_plugin_path) + if (COMMAND qt_internal_collect_command_environment) + qt_internal_collect_command_environment(test_env_path test_env_plugin_path) + else() + set(test_env_path "${QT6_INSTALL_PREFIX}/${QT6_INSTALL_BINS}") + set(test_env_plugin_path "${QT6_INSTALL_PREFIX}/${QT6_INSTALL_PLUGINS}") + endif() if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") set(WRAPPER_SUFFIX ".bat") |