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 21:20:10 +0000 |
commit | 1009f73d1f5c07947cdc2318150279ad43fc4b04 (patch) | |
tree | 33b7227b1f8552756dacae44960424488634daee | |
parent | f245d6bd99bda23e1e7b2ecc7f3731ea440afbad (diff) |
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") |