summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2022-01-11 10:50:56 +0100
committerMichal Klocek <michal.klocek@qt.io>2022-01-13 00:00:21 +0100
commit3cfc627a19005d818a24398e410162484ef3b5b5 (patch)
tree30a9d12582bec32c6a1b0fd42fb4b5ac577c06c0 /cmake
parentfbaab46becbf5ea063a8b4a01abf8cd1d4a1725d (diff)
downloadqtwebengine-3cfc627a19005d818a24398e410162484ef3b5b5.tar.gz
Fix moc path in case of top level cross build
Pick-to: 6.3 6.2 6.2.3 Fixes: QTBUG-99511 Change-Id: I8b9550c8a7e331e319fc7784224571beef0410b1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Functions.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake
index c6e553c41..b3640e00c 100644
--- a/cmake/Functions.cmake
+++ b/cmake/Functions.cmake
@@ -79,7 +79,11 @@ function(create_cxx_config cmakeTarget arch configFileName)
if(NOT QT_SUPERBUILD AND QT_WILL_INSTALL)
get_target_property(mocFilePath Qt6::moc IMPORTED_LOCATION)
else()
- set(mocFilePath "${QT_BUILD_DIR}/${INSTALL_LIBEXECDIR}/moc${CMAKE_EXECUTABLE_SUFFIX}")
+ if(CMAKE_CROSSCOMPILING)
+ set(mocFilePath "${QT_HOST_PATH}/${INSTALL_LIBEXECDIR}/moc${CMAKE_EXECUTABLE_SUFFIX}")
+ else()
+ set(mocFilePath "${QT_BUILD_DIR}/${INSTALL_LIBEXECDIR}/moc${CMAKE_EXECUTABLE_SUFFIX}")
+ endif()
endif()
file(GENERATE
OUTPUT $<CONFIG>/${arch}/${configFileName}