summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-04-10 12:10:07 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-04-10 12:10:07 -0700
commit6f997274f9112a9038a2e0837e709b9baadd531f (patch)
tree8c19408afc489e5d60125798bdfaa205933d2f92
parent7596db28b5ad55f8ff7cfd7c04eda8febe9ba012 (diff)
downloadsubsurface-6f997274f9112a9038a2e0837e709b9baadd531f.tar.gz
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>
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
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 "")