Check if Qt source dir is not empty to use syncqt

In an extreme case where /bin/syncqt.pl does exists,
is better to check if the QtBase_SOURCE_DIR is not empty
to avoid a mismatch script version that is being used.

Change-Id: Ia5694eadc5517998b827eccf70bdf6f3c14ebfa3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
bb10
Cristián Maureira-Fredes 2019-09-18 17:05:56 +02:00 committed by Cristian Maureira-Fredes
parent 1496a88429
commit 3ba61c0354
1 changed files with 1 additions and 1 deletions

View File

@ -675,7 +675,7 @@ function(qt_ensure_sync_qt)
# When building qtbase, use the source syncqt, otherwise use the installed one.
set(SYNCQT_FROM_SOURCE "${QtBase_SOURCE_DIR}/bin/syncqt.pl")
if(EXISTS "${SYNCQT_FROM_SOURCE}")
if(NOT ("${QtBase_SOURCE_DIR}" STREQUAL "") AND EXISTS "${SYNCQT_FROM_SOURCE}")
set(QT_SYNCQT "${SYNCQT_FROM_SOURCE}" CACHE FILEPATH "syncqt script")
message(STATUS "Using source syncqt found at: ${QT_SYNCQT}")