summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Funk <kevin.funk@kdab.com>2019-06-05 16:23:53 +0200
committerKevin Funk <kevin.funk@kdab.com>2019-06-05 15:09:18 +0000
commitaa548e09c78ee926231f68868f95e13737539e2f (patch)
tree24e26eed38f2752652e04da7f7442601aef53f5a
parent143981b570df906b036165c243da155daee3b599 (diff)
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 <simon.hausmann@qt.io>
-rw-r--r--cmake/QtBuild.cmake7
1 files 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