qtbase: use syncqt.pl from QT_HOST_PATH

Use syncqt.pl from QT_HOST_PATH if that is given, since qtbase
sources might not be available and CMAKE_INSTALL_PREFIX doesn't
check for sysroot.

Change-Id: I165b17a5a02fd4dbb2340bf69a641b8aaab8fabd
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Samuli Piippo 2020-01-21 12:45:38 +02:00 committed by Leander Beernaert
parent 7e2c198e90
commit e1170185e3

View File

@ -791,6 +791,12 @@ function(qt_ensure_sync_qt)
qt_path_join(syncqt_install_dir ${QT_INSTALL_DIR} ${INSTALL_LIBEXECDIR})
qt_copy_or_install(PROGRAMS "${SYNCQT_FROM_SOURCE}"
DESTINATION "${syncqt_install_dir}")
elseif(QT_HOST_PATH)
get_filename_component(syncqt_absolute_path
"${QT_HOST_PATH}/${INSTALL_LIBEXECDIR}/syncqt.pl"
ABSOLUTE)
set(QT_SYNCQT "${syncqt_absolute_path}" CACHE FILEPATH "syncqt script")
message(STATUS "Using host syncqt found at: ${QT_SYNCQT}")
else()
get_filename_component(syncqt_absolute_path
"${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBEXECDIR}/syncqt.pl"