From aa548e09c78ee926231f68868f95e13737539e2f Mon Sep 17 00:00:00 2001 From: Kevin Funk Date: Wed, 5 Jun 2019 16:23:53 +0200 Subject: [PATCH] cmake: Ensure syncqt.pl from source is found ... in superbuilds. PROJECT_SOURCE_DIR points to the wrong directory in that case. Change-Id: Ic0cba254734c4693b418dd8a0d8e77063914a9de Reviewed-by: Simon Hausmann --- cmake/QtBuild.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index afd50c55ac..e22a56f717 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -561,12 +561,13 @@ function(qt_ensure_sync_qt) endif() # When building qtbase, use the source syncqt, otherwise use the installed one. - if(EXISTS "${PROJECT_SOURCE_DIR}/bin/syncqt.pl") - set(QT_SYNCQT "${PROJECT_SOURCE_DIR}/bin/syncqt.pl" CACHE FILEPATH "syncqt script") + set(SYNCQT_FROM_SOURCE "${QtBase_SOURCE_DIR}/bin/syncqt.pl") + if(EXISTS "${SYNCQT_FROM_SOURCE}") + set(QT_SYNCQT "${SYNCQT_FROM_SOURCE}" CACHE FILEPATH "syncqt script") message(STATUS "Using source syncqt found at: ${QT_SYNCQT}") qt_path_join(syncqt_install_dir ${QT_INSTALL_DIR} ${INSTALL_LIBEXECDIR}) - qt_copy_or_install(PROGRAMS "${PROJECT_SOURCE_DIR}/bin/syncqt.pl" + qt_copy_or_install(PROGRAMS "${SYNCQT_FROM_SOURCE}" DESTINATION "${syncqt_install_dir}") else() get_filename_component(syncqt_absolute_path