      set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
  !!ELSE
 -    set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
-+    set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/uic$$CMAKE_BIN_SUFFIX\")
++    set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/uic${OE_QMAKE_BIN_SUFFIX}\")
  !!ENDIF
      _qt5_Widgets_check_file_exists(${imported_location})
  

 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
index e0652fdcf9..215f4357f8 100644
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
@@ -5,7 +5,7 @@ if (NOT TARGET Qt5::qmake)

     set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
 !!ELSE
-    set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
+    set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/moc${OE_QMAKE_BIN_SUFFIX}\")
 !!ENDIF
     _qt5_Core_check_file_exists(${imported_location})
 
