cmake: improve test for variable

CMake still confuses me. When testing if a variable was set it sometimes needs
to want "DEFINED", but sometimes I need to compare it to an empty string. Let's
do both (this seems to fix the problem I ran into) - but this is still weird.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-04-10 12:10:07 -07:00
parent 7596db28b5
commit 6f997274f9

View file

@ -376,7 +376,7 @@ set(QTTRANSLATIONS_BASE
qt_zh_TW.qm
)
if(QT_TRANSLATION_DIR STREQUAL "")
if(NOT DEFINED QT_TRANSLATION_DIR OR QT_TRANSLATION_DIR STREQUAL "")
set(QT_TRANSLATION_DIR ${Qt5Core_DIR}/../../../translations)
endif()
set(QTTRANSLATIONS "")