summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@qt.io>2021-12-01 17:26:01 +0100
committerDominik Holland <dominik.holland@qt.io>2021-12-01 18:06:03 +0100
commit2b57fb6082a9861ce504ff5a089a7fd04c7bad0d (patch)
tree78905f7218ab9519688d21f81be26a19b278d9d2
parent59762d2b675059d0ea9afcdf53a1437a8f655c44 (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. Pick-to: 6.2 6.2.2 Change-Id: I201c3d2037ceb40989e555c84d37fb17a42cdc39 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
-rw-r--r--src/main-lib/Qt6AppManMainPrivateMacros.cmake7
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")