From c07196c98c6998813fee3ab2889bba5d36447f58 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Wed, 27 Jul 2016 01:44:31 +0200 Subject: Fix inclusion when there's no Qt5 ECMQueryQmake will fail as it's designed to only work with Qt5. We don't want to terminate the execution there, just to spit a warning and leave. If we suggest qmake-qt5 as a command, we'll end up performing the call anyway. This will fix the ExecuteCoreModules test under latest-qt4 build. --- modules/ECMQueryQmake.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/ECMQueryQmake.cmake b/modules/ECMQueryQmake.cmake index 0a3129d4..fa0949df 100644 --- a/modules/ECMQueryQmake.cmake +++ b/modules/ECMQueryQmake.cmake @@ -1,6 +1,8 @@ find_package(Qt5Core QUIET) -set(_qmake_executable_default "qmake-qt5") +if (Qt5Core_FOUND) + set(_qmake_executable_default "qmake-qt5") +endif () if (TARGET Qt5::qmake) get_target_property(_qmake_executable_default Qt5::qmake LOCATION) endif() -- cgit v1.2.1