From 6f997274f9112a9038a2e0837e709b9baadd531f Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 10 Apr 2015 12:10:07 -0700 Subject: 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 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index acd9577dc..008502871 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 "") -- cgit v1.2.3-70-g09d2