From 3ba61c03541d94fb88a879e4c53d2ae0e89b1424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?= Date: Wed, 18 Sep 2019 17:05:56 +0200 Subject: [PATCH] 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 --- cmake/QtBuild.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 11a4b66e3f..9e7db08f9b 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -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}")