summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2022-03-24 12:05:15 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2022-03-25 22:43:49 +0100
commit02e5b0ffda7dded9af65b7f09a8d1a7ddfe8fda2 (patch)
treee89135293471b839df62a62ed67b2b83f33c7cce /cmake
parent862f42e806dce4051fd1a58c6ad2844a45223807 (diff)
CMake: Fix handling of the CROSSCOMPILING_EMULATOR property
CROSSCOMPILING_EMULATOR is a target property, not a test property. Fixes: QTBUG-87864 Pick-to: 6.2 6.3 Change-Id: Icb07e9ed71a6bcbfceb7aa2116bf56eaa0a545c6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtTestHelpers.cmake5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmake/QtTestHelpers.cmake b/cmake/QtTestHelpers.cmake
index 8a0c65739d..a8d6682e02 100644
--- a/cmake/QtTestHelpers.cmake
+++ b/cmake/QtTestHelpers.cmake
@@ -516,8 +516,9 @@ for this function. Will be ignored")
# Prepend emulator to test command in generated cmake script instead. Keep in mind that
# CROSSCOMPILING_EMULATOR don't check if actual cross compilation is configured,
# emulator is prepended independently.
- if(CMAKE_CROSSCOMPILING)
- get_test_property(${arg_NAME} CROSSCOMPILING_EMULATOR crosscompiling_emulator)
+ set(crosscompiling_emulator "")
+ if(CMAKE_CROSSCOMPILING AND TARGET ${arg_NAME})
+ get_target_property(crosscompiling_emulator ${arg_NAME} CROSSCOMPILING_EMULATOR)
if(NOT crosscompiling_emulator)
set(crosscompiling_emulator "")
else()