Commit f93278cb authored by Harald Sitter's avatar Harald Sitter 🏳🌈 Committed by Dennis Nienhüser
Browse files

change QT_IMPORTS_DIR to also cover false and NOTFOUND

if(DEFINED var) only checks if the var is defined, but with certain Finders
var can be set but NOTFOUND.

For the purposes of the if at hand we want to make sure that we have a
*valid* QT_IMPORTS_DIR not just a set one. To that end if(var) is the
correct instruction here as var being undefined, 0, OFF, IGNORE or NOTFOUND
will end up as a false condition making sure that we only set
MARBLE_QT_IMPORTS_DIR to the value of QT_IMPORTS_DIR iff it is a truthy
value.

REVIEW: 125880
parent b06747b5
...@@ -9,7 +9,7 @@ endif(BUILD_WITH_DBUS) ...@@ -9,7 +9,7 @@ endif(BUILD_WITH_DBUS)
if( QT_QTDECLARATIVE_FOUND OR Qt5Quick_FOUND ) if( QT_QTDECLARATIVE_FOUND OR Qt5Quick_FOUND )
OPTION(IGNORE_CMAKE_INSTALL_PREFIX_FOR_DECLARATIVE_PLUGINS "Install Marble Qt Declarative plugins to QT_IMPORTS_DIR even if that is out of the CMAKE_INSTALL_PREFIX") OPTION(IGNORE_CMAKE_INSTALL_PREFIX_FOR_DECLARATIVE_PLUGINS "Install Marble Qt Declarative plugins to QT_IMPORTS_DIR even if that is out of the CMAKE_INSTALL_PREFIX")
IF(DEFINED QT_IMPORTS_DIR) IF(QT_IMPORTS_DIR)
SET(MARBLE_QT_IMPORTS_DIR ${QT_IMPORTS_DIR}) SET(MARBLE_QT_IMPORTS_DIR ${QT_IMPORTS_DIR})
ELSE() ELSE()
# Fallback when FindQt.cmake (part of cmake) does not define QT_IMPORTS_DIR. Get it from qmake instead. # Fallback when FindQt.cmake (part of cmake) does not define QT_IMPORTS_DIR. Get it from qmake instead.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment