diff options
author | Aleix Pol <aleixpol@kde.org> | 2016-07-26 14:06:56 +0200 |
---|---|---|
committer | Aleix Pol <aleixpol@kde.org> | 2016-07-26 14:06:56 +0200 |
commit | 8ac7abb78d97210c5cbbc87fba83d58d7b843a8d (patch) | |
tree | fb8b65283e99e417d586a85e87e51612caa4abff | |
parent | 5bb92992317a6cf878c823cadac6dd0ccff969d6 (diff) | |
download | extra-cmake-modules-8ac7abb78d97210c5cbbc87fba83d58d7b843a8d.tar.gz extra-cmake-modules-8ac7abb78d97210c5cbbc87fba83d58d7b843a8d.tar.bz2 |
Add a fallback method for query_qmake() when there's no Qt5 installation
Addresses its usage on systems where Qt5 isn't installed, it allows for
modules using it to decide what they should do.
REVIEW: 128488
-rw-r--r-- | modules/ECMQueryQmake.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/ECMQueryQmake.cmake b/modules/ECMQueryQmake.cmake index 8f4cf177..0a3129d4 100644 --- a/modules/ECMQueryQmake.cmake +++ b/modules/ECMQueryQmake.cmake @@ -9,6 +9,11 @@ set(QMAKE_EXECUTABLE ${_qmake_executable_default} # This is not public API (yet)! function(query_qmake result_variable qt_variable) + if(NOT QMAKE_EXECUTABLE) + set(${result_variable} "" PARENT_SCOPE) + message(WARNING "Should specify a qmake Qt5 binary. Can't check ${qt_variable}") + return() + endif() execute_process( COMMAND ${QMAKE_EXECUTABLE} -query "${qt_variable}" RESULT_VARIABLE return_code |